ST_Simplify()¶
Simplifies a geometry with the Douglas-Peucker algorithm.
Syntax¶
ST_Simplify(geom, tolerance)
Arguments¶
Argument |
Description |
|---|---|
|
A GEOMETRY or GEOMETRY32 value. |
|
Nonnegative FLOAT64 simplification tolerance. |
Return Value¶
Returns a simplified geometry in the same geometry family as the input.
Usage Notes¶
Examples¶
DROP DATABASE IF EXISTS geo_operation_demo;
CREATE DATABASE geo_operation_demo;
USE geo_operation_demo;
SELECT ST_AsText(ST_Simplify(ST_GeomFromText('LINESTRING(0 0,5 0.0001,10 0)'), 0.001)) AS simplified;
DROP DATABASE geo_operation_demo;