Feature Request: Support for FeatureCollection<MultiPoint> to first parameter of pointsWithinPolygon
See original GitHub issue- [version 5.1.6 and 6.3.0]
const geojson = turf.featureCollection([
turf.multiPoint([
[10, 10],
[-10, -10]
])
]);
const polygon = turf.polygon([[
[0, 0],
[15, 0],
[15, 15],
[0, 15],
[0,0]
]]);
turf.pointsWithinPolygon(geojson, polygon);
> "Error: coord must be GeoJSON Point or an Array of numbers"
Thanks for the awesome library.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Turf.js pointsWithinPolygon works for Polygon but not ...
I am trying to use Turf.js to find all points within a bounding box for a FeatureCollection. According to the documentation, you can...
Read more >How To: Count the number of point features within a polygon ...
This workflow explains the steps to determine the number of earthquakes that have occurred in the polygon that represents Indonesia. Procedure.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This landed in master, not yet published
Great. Yeah, I think that, if option 2 were implemented, it would not help me accomplish what I wanted to accomplish, which is: find the count of points in the polygon.