mapbox / mapbox/cheap-ruler

A Perl Port, README (Polygons) and test.js

Open
#57 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
JavaScript
Stars
431
Forks
37
PR merge metrics
No merged PRs in 30d

Description

A Perl port

https://github.com/aavmurphy/CheapRuler
https://metacpan.org/pod/Geo::CheapRuler

Some clarification on polygons. Is this correct?
Polygons are a series of rings.
The first ring is exterior and clockwise.
Subsequent rings are interior (holes) and anticlockwise.
Do the first and last point of each ring have to be the same?

In `test.js`, in `lineslice` and `lineslicealong`, i needed to add
`const clean_line = turf.cleanCoords( turf.lineString(line) );`

(this removes duplicate adjacent points)

Thank you for CheapRuler!
Andrew

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the README discussion about polygon rings and the Perl port links first. Then inspect test.js, especially lineslice and lineslicealong, and determine whether the cleanCoords change reflects expected behavior. Done means the polygon guidance is settled in the README and the relevant test behavior is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, perl
Domain
documentation, testing
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.