ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / IsMSimple Method
The input geometry. Cannot be a GeometryBag.
Example

In This Topic
    IsMSimple Method (IGeometryEngine)
    In This Topic
    Determines if all the M-values are numbers.
    Syntax
    bool IsMSimple( 
       Geometry geometry
    )
    Function IsMSimple( _
       ByVal geometry As Geometry _
    ) As Boolean

    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.
    Exceptions
    ExceptionDescription
    Geometry is null.
    This method is not implemented for GeometryBag.
    Example
    Determine if all the M-values are numbers - IsMSimple
    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
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.3 or higher.
    See Also