-
Notifications
You must be signed in to change notification settings - Fork 942
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
Getting error while finding difference between a multipolygon and a polygon #721
Comments
Hi @amishas157 This is likely due to the same issue previously around Also as an FYI - in jsfiddle you can add an external resource like the minified version of turf with the url Cheers |
Whoops cool. Thank for the turfy information. : ) Will try it sure. |
Looks like |
@amishas157 Looks like the 2nd Multi-Polygon is really a LineString (seems like the issue is coming from Solution (quick fix):We could remove empty polygons prior to performing the |
- Major refactoring to `index.js` & `test.js` - Update JSDocs & Typescript definition to support MultiPolygon #721
@DenisCarriere Little confused, do we need to use flattenEach method or do any preprocessing before applying difference operation? |
No, the issue wasn't the MultiPolygon, it was related to empty polygons. |
@amishas157 Just released a patch release
|
Wohooo 🎉 On it. |
Hey @DenisCarriere 👋 I tried running this code sinppet https://jsfiddle.net/tboq1cv5/ but looks like it is giving the error. Can you confirm once? |
@amishas157 Looks like patch release didn't include the newest changes (must of published v4.2.1 on a different branch 🤦♂️ ). Ok I've published another patch release
|
🙇♀️
Yes, That time is meant for sleeping 😴 and work 🙅♂️ . |
@DenisCarriere , oops I think we need to also publish a new package for turf-invariant, which has got getGeom method and use that in turrf-difference, coz right now i see this error:
|
Strange that I didn't get that error, might be my local environnement. Ok let's wait and test this again until I publish all the other repos |
@amishas157 Just published v4.3.0, let me know if this issue is still happening on other data. I used @rowanwins's approach and everything seems to work: https://jsfiddle.net/yjctqtc6/ Feel free to close if it's resolve 👍 |
Awesome, this works 💯 . Thanks @DenisCarriere :) |
I am getting following error while finding the difference betweeen a polygon and a multipolygon.
The polygon and multipolygon are following:
Source Code:
https://jsfiddle.net/tboq1cv5/
Not sure if the input to difference method is right or not.
cc @rowanwins @DenisCarriere
The text was updated successfully, but these errors were encountered: