2

There seems to be wrong with the overlaps function. Suppose I have this GeoDataFrame consisting of LineString geometries only with crs='EPSG:3347:

enter image description here

Then I went ahead to extract only the first row's LineString, and put in a GeoSeries format as follows:

enter image description here

And then used the overlaps function. But it gives the wrong result. The first row in the output is False when it should have been True since they are merely the same LineString. So I'm not sure why it doesn't work.

1 Answer 1

0

If you mean that geometry1 is the same than geometry2 then they do not overlap. See the literal explanation https://en.wikipedia.org/wiki/DE-9IM

a overlaps b: they have some but not all points in common, they have the same dimension, and the intersection of the interiors of the two geometries has the same dimension as the geometries themselves

2
  • Ah I see, I could be wrong. Maybe overlaps is not the correct function I need. I need a function that works like intersects but the intersections should only be LineStrings or MultiLineStrings. Do you know what is the right function to use? I could create a column that determines the intersections first and then another column for determining if it contains 'LineString' in its name, but I think it's rather slow.
    – M. Fire
    Oct 11, 2022 at 18:18
  • I would go with the logic of "a intersects b AND the geometry type of intersection(a,b) is not point".
    – user30184
    Oct 11, 2022 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.