Hi
i have this polygon data in my database
My question is simple: how can i check if a point is within that region?
data is in table called countries
in a column called boundaries
i tried this
Within( 'POINT (32.20618899622122 -99.50001916204346)', boundaries ) = true
and it should retrieve one record but i got empty result from the query
Hi @mohammad_altoiher ,
It looks like you are using the Spatial System - Cartesian
for the point, and to work correctly with the polygon you need to use the Spatial System - WGS 84
.
Then the point will look something like this:
POINT (-96.86691404 32.75016031)
and the query will work as expected.
You can try this query for Texas:
Within('POINT (-96.86691404 32.75016031)', boundaries) = True
Regards,
Sergey
The issue was using place(lat lng) not place(lng lat).