[postgis-devel] [PostGIS] #1987: Results given by ST_Simplify inconsistent between PostGIS 1.5.2 and 2.0.1

PostGIS trac at osgeo.org
Sun Sep 9 21:49:49 PDT 2012


#1987: Results given by ST_Simplify inconsistent between PostGIS 1.5.2 and 2.0.1
--------------------------+-------------------------------------------------
 Reporter:  ChrisInCambo  |       Owner:  pramsey      
     Type:  defect        |      Status:  new          
 Priority:  high          |   Milestone:  PostGIS 2.0.2
Component:  postgis       |     Version:  2.0.x        
 Keywords:                |  
--------------------------+-------------------------------------------------
 I've recently upgraded to 2.0.1 and have noticed some inconsistencies
 between the both version in the behaviour of ST_Simplify.

 If you run the statement from the docs:

 SELECT ST_Npoints(the_geom) As np_before,
 ST_NPoints(ST_Simplify(the_geom,0.1)) As np01_notbadcircle,
 ST_NPoints(ST_Simplify(the_geom,0.5)) As np05_notquitecircle,
 ST_NPoints(ST_Simplify(the_geom,1)) As np1_octagon,
 ST_NPoints(ST_Simplify(the_geom,10)) As np10_triangle,
 (ST_Simplify(the_geom,100) is null) As  np100_geometrygoesaway
 FROM (SELECT ST_Buffer('POINT(1 3)', 10,12) As the_geom) As foo;

 Both return the same results for each column except
 "np100_geometrygoesaway", with 1.5.2 returning true as expected and 2.0.1
 returning false.

 When I use this method using real world data the differences are massive.
 For example the feature that I've tested on was 2120 points before
 simplification, then gets reduced to 7 when using a threshold of 0.1 on
 version 1.5.2, but for version 2.0.1 it only gets reduced to 2110.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/1987>
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