[postgis-devel] [PostGIS] #1292: ST_SnapToGrid returns a value out of range
PostGIS
trac at osgeo.org
Sun Nov 13 16:14:17 PST 2011
#1292: ST_SnapToGrid returns a value out of range
---------------------------+------------------------------------------------
Reporter: realityexists | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis | Version: trunk
Keywords: |
---------------------------+------------------------------------------------
PostGIS 2.0.0 as of 2011-11-08
I've found some odd behaviour in ST_SnapToGrid, which looks like a bug.
When I run
SELECT ST_SnapToGrid(ST_Transform(ST_GeomFromText('POINT(180 50)',
4269), 4326), 0.00001)::geography
an error is returned:
ERROR: Coordinate values are out of range [-180 -90, 180 90] for
GEOGRAPHY type
Calling ST_AsText() on the same geometry returns "POINT(180 50)", as
expected. Interestingly, if I either decrease or even increase the
precision the error does not occur. Eg. this works fine:
SELECT ST_SnapToGrid(ST_Transform(ST_GeomFromText('POINT(180 50)',
4269), 4326), 0.000001)::geography
It's only the value 0.0001 that seems to cause a problem.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1292>
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