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

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

    Parameters

    geometry
    The input geometry.

    Return Value

    The geometry with the M-values set to NaN. If the geometry is empty, 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 = 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 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.4 or higher.
    See Also