ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Geometry Namespace / GeometryEngine Class / GetPointsAtM Method
The multipart from which the locations will be extracted.
The M value to locate.
The lateral offset of the output points.
Example

In This Topic
    GetPointsAtM Method (GeometryEngine)
    In This Topic
    Gets a multipoint corresponding to the locations along the multipart where the specified M value occurs. Coordinates/measures are interpolated when appropriate.
    Syntax
    Public Function GetPointsAtM( _
       ByVal multipart As Multipart, _
       ByVal mValue As Double, _
       ByVal offset As Double _
    ) As Multipoint

    Parameters

    multipart
    The multipart from which the locations will be extracted.
    mValue
    The M value to locate.
    offset
    The lateral offset of the output points.

    Return Value

    Multipoint representing the locations found.
    Exceptions
    ExceptionDescription
    Multipart is null or empty.
    This geometry is not M-Aware.
    Spatial reference of multipartis an image coordinate system.
    Example
    Get a multipoint corresponding to the locations where the specified M values occur along the geometry - GetPointsAtM
    string json = "{\"hasM\":true,\"paths\":[[[-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}}";
    Polyline polyline = PolylineBuilderEx.FromJson(json);
    
    Multipoint multipoint = GeometryEngine.Instance.GetPointsAtM(polyline, 10, 500);
    // multiPoint.PointCount = 4
    // multipoint.Points[0]  X= -3000, Y= -2500  M= 10
    // multipoint.Points[1]  X= -500, Y= -2500  M= 10
    // multipoint.Points[2]  X= 500, Y= -2500  M= 10
    // multipoint.Points[3]  X= 3000, Y= -2500  M= 10
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also