ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Geometry Namespace / GeometryEngine Class / DropMs Method
The input geometry.
Example

In This Topic
    DropMs Method (GeometryEngine)
    In This Topic
    Sets all the M-values to NaN.
    Syntax
    public Geometry DropMs( 
       Geometry geometry
    )
    Public Function DropMs( _
       ByVal geometry As Geometry _
    ) As Geometry

    Parameters

    geometry
    The input geometry.

    Return Value

    The geometry with the M-values set to NaN. If the geometry is empty or the spatial reference is null, then the input geometry is returned unchanged.
    Exceptions
    ExceptionDescription
    Geometry is null.
    This geometry is not M-Aware.
    The method is not implemeted for GeometryBag.
    Example
    Set all the M-values to NaN - DropMs
    string json = "{\"hasM\":true,\"paths\":[[[-4,2,1],[-4,5,2],[-2,5,3],[-2,7,4],[2,7,5]],[[4,1,-1],[2,1,-2],[2,-2,-3],[-3,-2,-4],[-3,0,-5]]]}}";
    Polyline polyline = PolylineBuilderEx.FromJson(json);
    Polyline outputPolyline = GeometryEngine.Instance.DropMs(polyline) as Polyline;
    // outputPolyline.HasM = true. Every M-value is NaN.
    // outputPolyline.ToJson() = {"hasM":true,"paths":[[[-4,2,null],[-4,5,null],[-2,5,null],[-2,7,null],[2,7,null]],[[4,1,-null],[2,1,null],[2,-2,null],[-3,-2,null],[-3,0,null]]]}
         
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.3 or higher.
    See Also