-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeoJSON comments #7
Comments
#11 says GeoJSON is working as expected. |
The documentation is a bit unclear for GeoJson. From the function call i'm assuming polygonFromGeoJSON will retrieve a single polygon from a geojson object that only contains a single polygon? Also the inverted tag has no explanation so I am unsure if this is auto generated when reading from geojson? Maybe an example for this would help. My use case is to combine 10 to 500 polygons retrieved from 4-15 geojson files. Do I need to extract them individually to union them? polygonFromGeoJSON seems to be what I'm looking for but I'm not sure if the result will be what I am expecting it to do, which is extract all polygon(s) and return an array of PolyboolJS polygons to use in union/intersect/etc. |
The The easiest way to explain the inverted flag is to see it in the demo: https://rawgit.com/voidqk/polybooljs/master/dist/demo.html If you click on the Invert Red or Invert Blue buttons, you can see what toggling the invert flag does. What's considered outside the polygon is now considered inside, and vice-versa. I don't know if you need to extract the GeoJSON individually, I don't know what your data looks like. The |
Extract all polygons from a geojson file. eg. This geojson contains Another example geojson collection Will About the inverted tag; Will the resulting poly from |
A handy page to play with geojson Added example geojson : pastebin |
Right, so the object that has Yes, |
Hey. Just to add some random feedbacks and caveats of my knowledge and experience about GeoJSON, maybe could help, and lead to improvements in the future.
Some useful stuff : |
So does this library returns holes when taking union ? |
Just switched from Turf to PolyBoolJs, and i must say i love it! We had many problems with Turf when working with it. Sometimes the resulting geometry is invalid, sometimes it create unreasonable geometries. With PolyBoolJs we didn't encounter such problems! What would be nice is if we could pass a Feature to PolyBoolJs and not only a geometry. Also if you stick to geometry a more meaningful error would be nice. I first thought the GeoJSON addon did not work. An Error like: Keep up the good work! |
Please leave comments here about the experimental GeoJSON support.
The text was updated successfully, but these errors were encountered: