Opened 5 years ago

Closed 5 years ago

#4492 closed defect (fixed)

ST_Simplify 3rd parameter is ignored

Reported by: Algunenano Owned by: Algunenano
Priority: high Milestone: PostGIS 2.3.11
Component: postgis Version: master
Keywords: Cc:

Description

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.

Change History (5)

comment:2 by Raul Marin, 5 years ago

In 17782:

Fix ST_Simplify ignoring the value of the 3rd parameter

References #4492
Closes https://github.com/postgis/postgis/pull/469

comment:3 by Raul Marin, 5 years ago

In 17783:

Fix ST_Simplify ignoring the value of the 3rd parameter

References #4492

comment:4 by Raul Marin, 5 years ago

In 17784:

Fix ST_Simplify ignoring the value of the 3rd parameter

References #4492

comment:5 by Raul Marin, 5 years ago

Resolution: fixed
Status: assignedclosed

In 17785:

Fix ST_Simplify ignoring the value of the 3rd parameter

Closes #4492

Note: See TracTickets for help on using tickets.