Skip to main content
2 of 3
naming
Vince
  • 20.5k
  • 16
  • 49
  • 65

Difference between ST_Simplify function in PostGIS 3.0.0 and PostGIS 2.5.3

Faced such a problem (or maybe it's a bug). I get different results when using the ST_Simplify function in PostGIS 3.0.0 and PostGIS 2.5.3.

There are source data that are simplified by using a query:

SELECT ST_Simplify(geometry, 20) FROM source_table 

For verification, I created two databases on different OS. PostgreSQL11-PostGIS-3 and PostgreSQL11-PostgiGIS-2.5 with the same data mapping and SRID.

Result:

Postgis 2.5.3 enter image description here enter image description here

Postgis 3.0.0enter image description here

PostGIS 3 lost a lot of small hole geometries, although the source data and the request are the same. Why is this happening and how to fix it in PostGIS-3?