18 Apr 2011 16:25
ST_Intersects on geography
Kidd, David M <d.kidd <at> imperial.ac.uk>
2011-04-18 14:25:11 GMT
2011-04-18 14:25:11 GMT
Hi,
Applogies if the is a stupid newbie question.
I have am writing some some simple point in polygon searches on geographic data using ST_Intersects, but have been getting some unexpected results;
Searching for a point in the southern hemisphere:
SELECT ST_Intersects('POINT(-160 -43)'::geography, 'POLYGON((-180 -90, -180 0, 180 0, 180 -90, -180 -90))'::geography)
Returns f
Searching for a point in the northern hemisphere:
SELECT ST_Intersects('POINT(160 43)'::geography, 'POLYGON((0 0, 0 90, 180 90, 180 0, 0 0))'::geography)
ERROR: BOOM! Could not generate outside point!
CONTEXT: SQL function "st_intersects" statement 1
CONTEXT: SQL function "st_intersects" statement 1
********** Error **********
ERROR: BOOM! Could not generate outside point!
SQL state: XX000
Context: SQL function "st_intersects" statement 1
SQL state: XX000
Context: SQL function "st_intersects" statement 1
This works though
David M. Kidd
Research Associate
Center for Population Biology
Silwood Park Campus
Imperial College London
0207 594 2470
_______________________________________________ postgis-users mailing list postgis-users <at> postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
RSS Feed