ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / LabelPoint Method
The polygon or envelope to label.
Example

In This Topic
    LabelPoint Method (IGeometryEngine)
    In This Topic
    Performs the LabelPoint operation on the geometry.
    Syntax
    MapPoint LabelPoint( 
       Geometry geometry
    )
    Function LabelPoint( _
       ByVal geometry As Geometry _
    ) As MapPoint

    Parameters

    geometry
    The polygon or envelope to label.

    Return Value

    Returns the label point for the geometry.
    Exceptions
    ExceptionDescription
    Geometry is null.
    The method is not implemented for GeometryBag.
    Geometry is not a polygon or an envelope.
    Geometry is empty.
    Example
    Determine label point for a Polygon
    // create a polygon
    List<Coordinate2D> list2D = new List<Coordinate2D>();
    list2D.Add(new Coordinate2D(1.0, 1.0));
    list2D.Add(new Coordinate2D(1.0, 2.0));
    list2D.Add(new Coordinate2D(2.0, 2.0));
    list2D.Add(new Coordinate2D(2.0, 1.0));
    
    Polygon polygon = PolygonBuilderEx.CreatePolygon(list2D);
    bool isSimple = GeometryEngine.Instance.IsSimpleAsFeature(polygon);
    MapPoint pt = GeometryEngine.Instance.LabelPoint(polygon);
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also