ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Geometry Namespace / GeometryEngine Class / GetMinMaxM Method
The multipart from which the M values are extracted.
The minimum M value.
The maximum M value.
Example

In This Topic
    GetMinMaxM Method (GeometryEngine)
    In This Topic
    Gets the minimum and maximum M value.
    Syntax
    public void GetMinMaxM( 
       Multipart multipart,
       out double minM,
       out double maxM
    )
    Public Sub GetMinMaxM( _
       ByVal multipart As Multipart, _
       ByRef minM As Double, _
       ByRef maxM As Double _
    ) 

    Parameters

    multipart
    The multipart from which the M values are extracted.
    minM
    The minimum M value.
    maxM
    The maximum M value.
    Exceptions
    ExceptionDescription
    Multipart is null or empty.
    This geometry is not M-Aware.
    Spatial reference of multipartis an image coordinate system.
    Example
    Get the minimum and maximum M values - GetMinMaxM
    string json = "{\"hasM\":true,\"rings\":[[[-3000,-2000,10],[-2000,-2000,15],[-1000,-2000,20],[0,-2000,0],[1000,-2000,-20],[2000,-2000,-30],[3000,-2000,10],[4000,-2000,5]]],\"spatialReference\":{\"wkid\":3857}}";
    Polygon polygon = PolygonBuilderEx.FromJson(json);
    
    double minM, maxM;
    GeometryEngine.Instance.GetMinMaxM(polygon, out minM, out maxM);
    // minM = -30 
    // maxM = 20
    
    json = "{\"hasM\":true,\"paths\":[[[-3000,-2000,10],[-2000,-2000,null],[-1000,-2000,null]]]}";
    Polyline polyline = PolylineBuilderEx.FromJson(json);
    
    GeometryEngine.Instance.GetMinMaxM(polyline, out minM, out maxM);
    // minM = 10
    // maxM = 10
    
    json = "{\"hasM\":true,\"paths\":[[[-3000,-2000,null],[-2000,-2000,null],[-1000,-2000,null]]]}";
    polyline = PolylineBuilderEx.FromJson(json);
    
    GeometryEngine.Instance.GetMinMaxM(polyline, out minM, out maxM);
    // minM = double.Nan
    // maxM = double.Nan
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also