generalize Or Null
fun generalizeOrNull(geometry: Geometry, maxDeviation: Double, removeDegenerateParts: Boolean): Geometry?
Generalizes the given geometry by removing vertices based on the Douglas-Poiker algorithm. Point and Multipoint geometries are left unchanged. Envelope is converted to a Polygon and then generalized.
Supports true curves as input, producing a densified curve as output where applicable.
Return
The geometry object that represents the generalization of the input geometry, or null if an error occurs.
Since
200.1.0
Parameters
geometry
A geometry object.
max Deviation
The maximum distance that the generalized geometry can deviate from the original, in the same units as the geometry's spatial reference system.
remove Degenerate Parts
True if degenerate parts of the resulting geometry that are undesired for drawing are removed, false otherwise.