Add option to voronoi to retain properties
See original GitHub issueSo I have a FeatureCollection with (among other data):
geometry: { type: "Point", coordinates: […] },
properties: { id, name ... }
However, when I do voronoiPolygons = turf.voronoi(featureCollection)
, I find that every Feature in voronoiPolygons
has empty properties:
geometry: { type: "Polygon", coordinates: […] }
properties: { }
Is it possible to propagate the Features properties to the polygons generated by this method?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
How to create Voronoi regions with Geospatial data in Python
To create Voronoi diagrams, we are going to use several libraries, ... Points and some other attributes like the county, post address, etc....
Read more >Procedural Nodes (part 34) - Voronoi in Blender - YouTube
This video took a long time to make, I hope it is helpful to you!Blend file link - https://gum.co/EkjLaAlso free on patreon ...
Read more >qvoronoi -- Voronoi diagram
Qhull outputs the Voronoi vertices for each Voronoi region. With option 'Fv', it lists all ridges of the Voronoi diagram with the corresponding...
Read more >Get point associated with Voronoi region (scipy.spatial.Voronoi)
For your first question: The issue is that there are N+1 regions (polygons) defined for the N points, and I'm not sure what...
Read more >VoronoiDiagrammer
Note: If a Voronoi diagram is to be made from points with elevations, and you want to add additional breakline and tolerance options,...
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
I actually think this should be the default behaviour and we don’t need an extra option. Other operations in turf retain the properties (eg
transformTranslate
). If you don’t want the properties on the polygons you can either clear them from the points before you pass to voronoi or after you get the results back.Ok, I have confirmed that feature order is preserved.