[postgis-users] st_within operation not considering sphericaldistortion

Suhr, Ralf Ralf.Suhr at itc-halle.de
Mon Mar 8 07:00:42 PST 2010


Yes it's only thinking,

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

 st_within 
-----------
 F

If you use only EPSG:4326 all coordinates are plain orthogonal and your query is true.

Gr Ralf

-----Ursprüngliche Nachricht-----
Von: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] Im Auftrag von info at georgherdt.de
Gesendet: Montag, 8. März 2010 15:49
An: postgis-users at postgis.refractions.net
Betreff: [postgis-users] st_within operation not considering sphericaldistortion

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


_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list