-
Notifications
You must be signed in to change notification settings - Fork 557
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
Questionable behaviour of symmetric_difference_all #2027
Comments
I also think this is not the expected result, so I'd think it is a bug. I had a (very) quick look on how it is implemented, and the same |
Indeed, you essentially can't do this iteratively like we do now, in each step you need to consider all other geometries. The very dumb way I can currently think of is that for each geometry, you calculate the sym diff with the union (or just collection) of all other geometries. That sounds quite expensive, but not sure if there is a way to optimize this? (one could use a spatial index to do the sym diff with only the relevant (intersecting) other geometries) @martinfleis did you have an actual use case for this, or just looking at it to consider adding the equivalent to geopandas? |
cc @caspervdw |
No use case. I hit this while trying to expose it on geopandas side. Deprecation is fine with me. |
My understanding of
symmetric_difference_all
is that it returns all parts of geometries that are unique to a single one, i.e. those parts that do not intersect any other. But that doesn't seem to be the case as shown in the example below.Visually:
You can see that the small square in the middle is shared by all three polygons.
Yet, it is present in the result.
I would expect the result to not contain that small square. Is this my misunderstanding or a bug?
The text was updated successfully, but these errors were encountered: