turf.concave() returned undefined at high precision
See original GitHub issueCurrently I’m using the turf.concave method to convert a feature of points to a polygon.
var hull = turf.concave( fc, 1, 'miles' )
Although I can’t make the polygon concave on points lower than 1 mile. If I try:
var hull = turf.concave( fc, 0.001, 'miles' )
hull returns undefined.
Any ideas? I need to get a better accuracy reading here. Thank you!!!
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Turf.js | Advanced geospatial analysis
Takes a set of points and returns a concave hull Polygon or MultiPolygon. Internally, this uses turf-tin to generate geometries.
Read more >@turf/concave | Yarn - Package Manager
@turf/boolean-within. Boolean-within returns true if the first geometry is completely within the second geometry. The interiors of both geometries must ...
Read more >turf/concave
Start using @turf/concave in your project by running `npm i @turf/concave`. There are 5 other projects in the npm registry using @turf/concave.
Read more >PostGIS 2.5.9dev Manual
higher resolution table. These are generated along-side the main raster table when you use the -l switch in raster loading or can.
Read more >Whitebox Workflows for Python User Manual
This tool can be used to reduce the grid resolution of a raster by a user specified ... Therefore, polygons of complex shaped...
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 Free
Top 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
Gday @roblav96
So it looks like it is the maxEdge setting that it throwing things out for you http://turfjs.party/#/de35288c26dd7d456ff9
By setting the maxEdge at .001 miles you are basically saying each polygon edge should only be .001miles however your points are not spaced that closely together.
So basically if your points are close together you can set a very small maxEdge however if your points are far apart you need to increase your maxEdge setting.
That’s probably the best I can offer without knowing more about your use case…
Cheers Rowan
Here are the points for this demo: http://geojson.io/#id=gist:anonymous/165bdfb1b1e396c6dbe7&map=15/42.3369/-71.1686
Here is the code:
The variable ‘fc’ are the points on the map I posted.