[postgis-devel] [PostGIS] #2066: ST_DumpPoints may return latitude just over 90 depending on execution order
PostGIS
trac at osgeo.org
Thu Nov 15 21:01:59 PST 2012
#2066: ST_DumpPoints may return latitude just over 90 depending on execution order
---------------------------+------------------------------------------------
Reporter: realityexists | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.1.0
Component: postgis | Version: trunk
Keywords: |
---------------------------+------------------------------------------------
Comment(by realityexists):
OK, tested on Windows 7 x64, r10691, PostgreSQL 9.2.1. The original
problem no longer occurs, but this:
{{{
SELECT ST_AsText(ST_SnapToGrid(ST_Transform(ST_GeomFromText('POINT(180
50)', 4269), 4326), 0.00001)::geography)
}}}
returns POINT(-180 50) instead of POINT(180 50) as it used to. Note that
if you remove the cast to geography it still returns "POINT(180 50)". I
suspect it's something similar to the original problem with the longitude
being "just over" 180.
I think the behaviour of ST_AsText and other string-returning functions
should be consistent with ::geography, ie. if the value is close enough to
180 for ST_AsText to display it as "180" then it's also close enough for
::geography to convert it to 180, not -180. Anything else just gets really
confusing.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2066#comment:3>
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-devel
mailing list