Appearance
ST_SIMPLIFYPRESERVETOPOLOGY
Generates a simplified representation of a GEOGRAPHY object using a variant of the Douglas-Peucker algorithm while preserving topology.
Vertices within the specified tolerance distance are removed from the simplified geometry.
Syntax
sql
ST_SIMPLIFYPRESERVETOPOLOGY(<input>, <tolerance>)Arguments
<input>: TheGEOGRAPHYobject to be simplified<tolerance>: AFLOAT8value representing the tolerance in meters
Returns
Returns a simplified GEOGRAPHY object that preserves the topology of the input.
Example
sql
SELECT ST_AsText(ST_SimplifyPreserveTopology('LINESTRING(0 0, 0.5 0.5, 1 1)'::GEOGRAPHY, 1000));
-- 'LINESTRING(0 0, 1 1)'