[postgis-devel] [PostGIS] #1292: ST_SnapToGrid returns a value out of range

PostGIS trac at osgeo.org
Tue Jan 31 18:31:52 PST 2012


#1292: ST_SnapToGrid returns a value out of range
----------------------------+-----------------------------------------------
  Reporter:  realityexists  |       Owner:  pramsey      
      Type:  defect         |      Status:  reopened     
  Priority:  medium         |   Milestone:  PostGIS 2.0.0
 Component:  postgis        |     Version:  trunk        
Resolution:                 |    Keywords:               
----------------------------+-----------------------------------------------
Changes (by realityexists):

  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 Thanks, I think that's a very good approach. Just tested it out in r8990.

 This still fails:
 {{{
 SELECT ST_SnapToGrid(ST_GeomFromText('POINT(180 90)', 4326),
 0.00001)::geography
 }}}

 This also fails:
 {{{

 WITH data
 AS
 (
         SELECT ST_GeomFromText('POLYGON((140 50,150 50,180 50,140 50),(140
 60, 150 60,180 60,140 60))', 4326) AS one
         , ST_GeomFromText('GEOMETRYCOLLECTION(POINT(180 50),POINT(180
 60))', 4326) AS two
 )
 SELECT ST_AsText(ST_SnapToGrid(one, 0.00001)::geography),
 ST_AsText(ST_SnapToGrid(two, 0.00001)::geography)
 FROM data
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1292#comment:6>
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