Parameters
- geometry
- The input geometry. Cannot be a GeometryBag.
Return Value
Returns true if none of the M-values are NaN and false otherwise. If the geometry is not M-Aware, then false is returned.
Exception | Description |
---|---|
System.ArgumentNullException | Geometry is null. |
System.NotImplementedException | This method is not implemented for GeometryBag. |
Coordinate2D[] coords = { new Coordinate2D(-2, 2), new Coordinate2D(3, 5), new Coordinate2D(7, 2) }; Polyline polyline = PolylineBuilderEx.CreatePolyline(coords); // polyline.HasM = false bool isMSimple = GeometryEngine.Instance.IsMSimple(polyline); // isMSimple = false PolylineBuilderEx polylineBuilder = new PolylineBuilderEx(polyline); polylineBuilder.HasM = true; polyline = polylineBuilder.ToGeometry(); isMSimple = GeometryEngine.Instance.IsMSimple(polyline); // isMSimple = false MapPoint point1 = MapPointBuilderEx.CreateMapPoint(-2, 2, -1, 1); MapPoint point2 = MapPointBuilderEx.CreateMapPoint(3, 5, -2, 2); MapPoint[] points = { point1, point2 }; polyline = PolylineBuilderEx.CreatePolyline(points, AttributeFlags.HasM); isMSimple = GeometryEngine.Instance.IsMSimple(polyline); // isMSimple = true
Target Platforms: Windows 11, Windows 10