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>
: TheGEOGRAPHY
object to be simplified<tolerance>
: AFLOAT8
value 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)'