[postgis-users] st_within operation not considering spherical distortion

info at georgherdt.de info at georgherdt.de
Mon Mar 8 06:49:15 PST 2010


Hi,

yet I'm quite new to the list, I'm using postigis for some time.
For now I discovered the following behaviour for this query:

select st_within(st_geomfromtext('POINT (-40  
44.1)',4326),st_geomfromtext('POLYGON((0 44, -90 44, -90 46, 0 46, 0  
44))',4326))

Stating that the point (-40,44.1) is within the given polygon. But  
when considering the spherical "distortion" (the connect between the  
points are arcs not straight lines) on the described polygon this  
point cannot be within.
I've seen that there are some functions for calculating spherical  
distances but, nothing similar for the st_within function.

Can anybody help me whats wrong with that. Maybe its my thinking ;-)


Best regards

Georg Herdt





More information about the postgis-users mailing list