0

I have used the Shapely polygon intersection function:

object.intersection(other)

and get inconsistency in the direction and order of the vertices of the output polygon.

Is there a way to have a systematic set of outputs, or should I run through the output polygon and sort it?

Yair
  • 859
  • 2
  • 12
  • 27

1 Answers1

0

You may get better answers on https://gis.stackexchange.com/

Double check that you are using the right DE-9IM method. DE-9IM Wikipedia

If I understand you correctly with the systematic outputs you have multiple LinearRings inside your polygon and you want a separate result for each vs just having a single Boolean result for the entire polygon intersecting with other. The easiest way which is slower is to iterate through your polygon and compare each LinearRing. The faster way is to use sr-trees with the python package "rtrees". https://gis.stackexchange.com/a/119935/60045

Community
  • 1
  • 1
J'e
  • 3,014
  • 4
  • 31
  • 55