[postgis-tickets] [PostGIS] #4492: ST_Simplify 3rd parameter is ignored

PostGIS trac at osgeo.org
Thu Aug 29 02:12:20 PDT 2019


#4492: ST_Simplify 3rd parameter is ignored
------------------------+----------------------------
 Reporter:  Algunenano  |      Owner:  Algunenano
     Type:  defect      |     Status:  assigned
 Priority:  high        |  Milestone:  PostGIS 2.3.11
Component:  postgis     |    Version:  trunk
 Keywords:              |
------------------------+----------------------------
 No matter what you pass as the 3rd parameter to ST_Simplify, it's always
 assumed as true:

 {{{
 # WITH params2 AS
 (
     Select ST_Simplify(the_geom_webmercator, 1000000000) as g from
 public.benchmark_4c7214d90a79aa6760367a084a4d4a2f61fbe1c6cc4f7f9e76020
 ),
 params3False AS
 (
     Select ST_Simplify(the_geom_webmercator, 1000000000, false) as g from
 public.benchmark_4c7214d90a79aa6760367a084a4d4a2f61fbe1c6cc4f7f9e76020
 ),
 params3True AS
 (
     Select ST_Simplify(the_geom_webmercator, 1000000000, true) as g from
 public.benchmark_4c7214d90a79aa6760367a084a4d4a2f61fbe1c6cc4f7f9e76020
 )
 Select '2p', count(*) from params2 where g IS NOT NULL
 UNION ALL
 Select '3p_false', count(*) from params3False where g IS NOT NULL
 UNION ALL
 Select '3p_true', count(*) from params3True where g IS NOT NULL;
  ?column? | count
 ----------+-------
  2p       |     0
  3p_false |    13
  3p_true  |    13
 (3 rows)
 }}}

 Passing `false` as the 3rd parameter is being considered as a request to
 preserve the collapsed geometries, which is either a bug or highly
 counterintuitive.

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