Along doesn't work with MultiLineString
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 1k
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 4
Description
Please provide the following when reporting an issue:
- GeoJSON data as a gist file or geojson.io (filename extension must be
.geojson). - Snippet of source code or for complex examples use jsfiddle.
Hi guys, thx for your awesome work!
I'd like to ask if you are planning to add MultiLineString support to turf.along()?
Currently, it doesn't work, I'm getting error messages like:
angular.js:14961 TypeError: Cannot read property '1' of undefined
Uncaught Error: Coordinate is not a valid Point
This would be important to implement, since currently turf.along() fails with antimeridian cases. GeoJSON standard says antimeridian geometries should be MultiLineString type:
https://tools.ietf.org/html/rfc7946#section-3.1.9
Reproduced:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the turf.along() implementation and reproduce the failure with the linked jsfiddle and packages/turf-length/test/in/multi-linestring.geojson fixture. Trace how MultiLineString coordinates reach the calculation, then add coverage showing that antimeridian MultiLineString input is accepted without the reported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100