phayes / geoPHP

Advanced geometry operations in PHP
https://geophp.net
Other
861 stars 262 forks source link

Intersects, Crosses, Contains not working #171

Closed e1sep0 closed 3 years ago

e1sep0 commented 4 years ago

Hello, i try to check, if 2 Geometry crosses or overlaps. I get one Polygon and one Collection of Polygons. I tried to check all collection and every polygon with first polygon, but result is false. I tried intersect, overlaps, crosses, contains, covers, coveredBy, touches options, but all results are false (
I drawed theese polygons on map. There one polygon in another. How can i check this? Thank you! image image

BathoryPeter commented 4 years ago

These methods only works if GEOS is installed. See the Advanced Methods chapter in the API docs.

e1sep0 commented 4 years ago

GEOS is installed, other polygons work fine, but if one polygon in another i get false on all functions

e1sep0 commented 4 years ago

I have updated libgeos and got new error: TopologyException: side location conflict at 55.400816770953284 36.352091380312601 But i have no such coordinates. Help please, how to fix this problem? Thank you

e1sep0 commented 4 years ago

Problem was solved, when i divided GeometryCollection on several polygons and checked intersects of every polygon. Checking intersecting polygon with GeometryCOllection caused Exception.