Method Generalize
Generalize(Geometry, Double, Boolean)
Generalizes the given geometry by removing vertices based on the Douglas-Poiker algorithm.
Declaration
public static Geometry Generalize(Geometry geometry, double maxDeviation, bool removeDegenerateParts)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | geometry | The geometry to be generalized. |
| 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. |
| 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 - 100.15 |
| .NET 6.0 | 100.13 - 100.15 |
| .NET 6.0 Windows | 100.13 - 100.15 |
| .NET Framework | 100.0 - 100.15 |
| .NET 5 | 100.10 - 100.12 |
| .NET Core 3.1 | 100.7 - 100.12 |
| Xamarin.Android | 100.0 - 100.15 |
| Xamarin.iOS | 100.0 - 100.15 |
| UWP | 100.0 - 100.15 |
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.