You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a behaviour that is inherited from GEOS, the library that Shapely is a wrapper around.
I don't think this is a bug per se. It just isn't the way the algorithm that calculates the difference works. The two outputs are geometrically equivalent. I don't think the simple feature model places any significance on the order of parts in a collection.
Something explaining this could be added to the documentation. I'm not sure where the best place would be to add it though as this isn't something specific to the difference method.
Simple example:
As you can see, removing a
Point
from aMultiPoint
by usingdifference
breaks the initial ordering. Expected output would be:'MULTIPOINT (0 0, 1 1, 0 1)'
Is this a bug or by design? Docs don't say anything on this behaviour.
Shapely version: 1.6.4.post1, installed from conda.
The text was updated successfully, but these errors were encountered: