ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Geometry Namespace / GeometryEngine Class / IsSimpleAsFeature Method
The geometry to be tested.
(Optional) The default value is false. When true, the geometry will be tested for simplicity even if it has already been tested or simplified. Geometry has a non-persisted internal flag that is set by IsSimpleAsFeature or SimplifyAsFeature calls. The flag is used to avoid computations if the state of the geometry is known.
Example

In This Topic
    IsSimpleAsFeature Method (GeometryEngine)
    In This Topic
    Indicates whether this geometry is known to be topologically consistent according to the geometry type for storage in a database.
    Syntax
    public bool IsSimpleAsFeature( 
       Geometry geometry,
       bool forceIsSimple
    )
    Public Function IsSimpleAsFeature( _
       ByVal geometry As Geometry, _
       ByVal forceIsSimple As Boolean _
    ) As Boolean

    Parameters

    geometry
    The geometry to be tested.
    forceIsSimple
    (Optional) The default value is false. When true, the geometry will be tested for simplicity even if it has already been tested or simplified. Geometry has a non-persisted internal flag that is set by IsSimpleAsFeature or SimplifyAsFeature calls. The flag is used to avoid computations if the state of the geometry is known.

    Return Value

    Returns true if the geometry is simple. Otherwise, returns false.
    Exceptions
    ExceptionDescription
    Geometry is null.
    The method is not implemented for GeometryBag.
    Remarks
    See SimplifyAsFeature and IsSimpleAsFeature Pro Concepts topic. Note that NaN Z-values are not taken into account when determining if the geometry is topologically consistent. You should call ReplaceNaNZs on any geometry prior to saving it into a geodatabase.
    Example
    Project from WGS84
    // create the polygon
    List<MapPoint> pts = new List<MapPoint>();
    pts.Add(MapPointBuilderEx.CreateMapPoint(1.0, 1.0, SpatialReferences.WGS84));
    pts.Add(MapPointBuilderEx.CreateMapPoint(1.0, 2.0, SpatialReferences.WGS84));
    pts.Add(MapPointBuilderEx.CreateMapPoint(2.0, 2.0, SpatialReferences.WGS84));
    pts.Add(MapPointBuilderEx.CreateMapPoint(2.0, 1.0, SpatialReferences.WGS84));
    
    Polygon polygon = PolygonBuilderEx.CreatePolygon(pts);
    // ensure it is simple
    bool isSimple = GeometryEngine.Instance.IsSimpleAsFeature(polygon);
    
    // create the spatial reference to project to
    SpatialReference northPole = SpatialReferenceBuilder.CreateSpatialReference(102018);   // north pole stereographic 
    
    // project
    Geometry geometry = GeometryEngine.Instance.Project(polygon, northPole);
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also