MySQL Forums
Forum List  »  GIS

ST_Contains with multi polygon
Posted by: tabs den
Date: December 11, 2022 03:42AM


I Have 2 type of data : point(car) & Polygons(Boundary of town)
I want to know if my car is in town.

My fonction work well but not when I have MultiPolygons for a Town
When a town has Two or more boundaries my fonction return false even the car is in one Boundary

SELECT name FROM town WHERE ST_Contains(town.geom,GeomFromText( 'Point( $x $y)' ))


Options: ReplyQuote

Written By
ST_Contains with multi polygon
December 11, 2022 03:42AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.