PostGISDialect is using ST_Simplify instead of ST_SimplifyPreserveTopology

Description

Originally reported as GEOT-532:

The class org.geotools.data.postgis.PostGISDialect uses ST_Simplify() instead of ST_SimplifyPreserveTopology() - see lines 333 and 344.

  • ST_Simplify will often create extremely small polygons for polygons that have a portion that is quite thin (when the result should be a large polygon).

  • ST_SimplifyPreserveTopology() is much better at avoiding this (however, its a bit slower).

Environment

None

Activity

Show:
Andrea Aime
December 17, 2015, 7:10 AM

No, it's not a bit slower, it's a tragedy better not applied at all. This was already discussed in the other report, not sure why another ticket was opened for this one?

David Blasby
January 5, 2016, 8:29 PM

Just a note of caution - I believe the perpendicular offset code needs valid polygons to work (at least what the code implied).

The fix jody and I put in should try to fix invalid polygons, but it will not always work - you'll still likely have to deal with them.

Not sure what the impact of st_simplify (i.e. invalid polygons) is with the perpendicular offset code... Might not make any difference at all...

Andrea Aime
March 26, 2016, 3:25 PM

Closing as won't fix as the suggested solution is slower than not simplifying at all (which is an option allowed by the store)

Andrea Aime
February 15, 2017, 11:35 AM

Mass transitioning all resolved issues that have not been updated in the last month to closed state

Won't Fix

Assignee

Unassigned

Reporter

Jody Garnett

Triage

None

Components

Affects versions

Priority

Medium
Configure