Method Generalize
Generalize(Geometry, Double, Boolean)
Generalizes the given geometry by removing vertices based on the Douglas-Poiker algorithm.
Declaration
public static Geometry Generalize(this Geometry geometry, double maxDeviation, bool removeDegenerateParts)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geometry | The geometry to be generalized. |
System.Double | maxDeviation | The maximum distance that the generalized geometry can deviate from the original, in the same units as the geometry's spatial reference system. |
System.Boolean | removeDegenerateParts | When |
Returns
Type | Description |
---|---|
Geometry | A Geometry that represents the generalization of the input geometry. |
Remarks
Geometry is generalized by removing vertices based on the Douglas-Poiker algorithm. MapPoint 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.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.0 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.0 - 200.5 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.5 |
Relevant samples
Densify and generalize: A multipart geometry can be densified by adding interpolated points at regular intervals. Generalizing multipart geometry simplifies it while preserving its general shape. Densifying a multipart geometry adds more vertices at regular intervals.