[postgis-tickets] [PostGIS] #2534: st_distance is returning incorrect results for large geographies
PostGIS
trac at osgeo.org
Wed Nov 6 10:27:15 PST 2013
#2534: st_distance is returning incorrect results for large geographies
------------------------------------+---------------------------------------
Reporter: samuelb | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.1.1
Component: postgis | Version: 2.0.x
Keywords: st_distance, geography |
------------------------------------+---------------------------------------
Comment(by pramsey):
It seems to be consistently not finding that the point is in the polygon,
so the distance is the distance to the ring.
http://www.gcmap.com/mapui?P=+20S+20W-
60N+20W%0D%0A60N+20W-+60N+90E%0D%0A+60N+90E-
20S+90E%0D%0A20S+90E-+20S+20W%0D%0A0N+0E&MS=wls&DU=mi
Interesting, the distance POINT(-19 0) and POINT(-21 0) are the same,
which means the ring calculation is consistent, but the point-in-polygon
calculation is not. Reported on 1.5 and 2.0, still exists in 2.2, so not a
regression.
I wouldn't expect your desired use case (creating bounding "boxes" on a
sphere) to work particularly well regardless, since you're expecting
straight lines where they don't exist (see the great circle image above
and look at the top and bottom lines)
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2534#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list