Monotonicity GetMMonotonicity( Multipart multipart )
Function GetMMonotonicity( _ ByVal multipart As Multipart _ ) As Monotonicity
Parameters
- multipart
- The multipart to check for monotonicity.
Return Value
A combination of Monotonicity values.
Monotonicity GetMMonotonicity( Multipart multipart )
Function GetMMonotonicity( _ ByVal multipart As Multipart _ ) As Monotonicity
Exception | Description |
---|---|
System.ArgumentNullException | Multipart is null. |
System.InvalidOperationException | The multipart is not M-Aware. |
string json = "{\"hasM\":true,\"paths\":[[[-3000,-2000,10],[-2000,-2000,5],[-1000,-2000,0]]]}"; Polyline polyline = PolylineBuilderEx.FromJson(json); Monotonicity monotonicity = GeometryEngine.Instance.GetMMonotonicity(polyline); // monotonicity = Monotonicity.ValueDecreases // Create a polygon from the polyline Polygon polygon = PolygonBuilderEx.CreatePolygon(polyline); monotonicity = GeometryEngine.Instance.GetMMonotonicity(polygon); // monotonicity = ValueIncreases | ValueDecreases json = "{\"hasM\":true,\"paths\":[[[-3000,-2000,10],[-2000,-2000,10],[-1000,-2000,10]]]}"; polyline = PolylineBuilderEx.FromJson(json); monotonicity = GeometryEngine.Instance.GetMMonotonicity(polygon); // monotonicity = Monotonicity.ValueLevel json = "{\"hasM\":true,\"paths\":[[[-3000,-2000,null],[-2000,-2000,5],[-1000,-2000,10]]]}"; polyline = PolylineBuilderEx.FromJson(json); monotonicity = GeometryEngine.Instance.GetMMonotonicity(polyline); // monotonicity = ValueIncreases | ValueEmpty // Create an empty polyline Polyline emptyPolyline = PolylineBuilderEx.FromJson("{\"hasM\":true,\"paths\":[]}"); monotonicity = GeometryEngine.Instance.GetMMonotonicity(emptyPolyline); // monotonicity = Monotonicity.None
Target Platforms: Windows 11, Windows 10