ArcGISGeometry

Namespace: Esri::GameEngine::Geometry
Class: Esri/GameEngine/Geometry/ArcGISGeometry
Since: 1.0.0

Summary

Base class for all classes that represent geometric shapes.

Properties

PropertyTypeNullableReadonlySummary
No
Yes

The number of dimensions for the geometry.

No
Yes

The extent for the geometry.

No
Yes

True if this geometry contains curve segments; false otherwise.

No
Yes

A value indicating if the geometry has M.

No
Yes

A value indicating if the geometry has Z.

No
Yes

Check if a geometry is empty or not.

Yes
Yes

The spatial reference for the geometry.

Dimension

ArcGISGeometryDimension GetDimension() const

The number of dimensions for the geometry.

Returns ArcGISGeometryDimension::Unknown if an error occurs.

Extent

ArcGISEnvelope GetExtent() const

The extent for the geometry.

The extent for the geometry which is a envelope and contains the same spatial reference as the input geometry.

HasCurves

bool GetHasCurves() const

True if this geometry contains curve segments; false otherwise.

ArcGIS software supports polygon and polyline geometries that contain curve segments (where ArcGISSegment::IsCurve is true, sometimes known as true curves or nonlinear segments). Curves may be present in certain types of data - for example Mobile Map Packages (MMPK) or geometry JSON. When connecting to ArcGIS feature services that support curves, this API retrieves densified versions of curve feature geometries by default.

If a polygon or polyline geometry contains curve segments, this property returns true. Prior to v100.12, it was not possible to access curve segments, and only ArcGISLineSegment instances would be returned when iterating through the segments in a ArcGISPolygon or ArcGISPolyline object, irrespective of this property.

From v100.12, you can use curve segments when using a ArcGISMultipartBuilder to create or edit polygon and polyline geometries, and also get curve segments when iterating through the segments of existing ArcGISMultipart geometries when this property returns true. You can also choose to return true curves from feature services by using ArcGISRuntimeEnvironment.serviceCurveGeometryMode.

HasM

bool GetHasM() const

A value indicating if the geometry has M.

If an error occurs false is returned. M is a vertex value that is stored with the geometry.

HasZ

bool GetHasZ() const

A value indicating if the geometry has Z.

If an error occurs false is returned. Z typically represent elevations or heights.

IsEmpty

bool GetIsEmpty() const

Check if a geometry is empty or not.

Only check the geometry to see if it is empty. Does not check the spatial reference. Returns true if an error occurs.

SpatialReference

ArcGISSpatialReference GetSpatialReference() const

The spatial reference for the geometry.

If the geometry does not have a spatial reference null is returned.

Methods

SignatureReturn TypeSummary

Equals(const ArcGISGeometry&)

bool

Tests if this object is equal to a second ArcGISGeometry object.

Equals(const ArcGISGeometry&, double)

bool

Check if two geometries are equal to within some tolerance.

FromJSON(const FString&, const ArcGISSpatialReference&)

ArcGISGeometry

Creates a geometry from an ArcGIS JSON geometry representation.

Equals

bool Equals(const ArcGISGeometry& right) const

Tests if this object is equal to a second ArcGISGeometry object.

Since 1.0.0

Arguments
NameTypeConstSummary
right
Yes

The second geometry.

Returns bool

True if the comparison succeeds and the objects are equal, false otherwise.

Equals

bool Equals(const ArcGISGeometry& right, double tolerance) const

Check if two geometries are equal to within some tolerance.

Since 1.0.0

Arguments
NameTypeConstSummary
right
Yes

The second geometry.

tolerance
No

The tolerance.

Returns bool

True if the geometries are equal, within the tolerance, otherwise false.

FromJSON

static ArcGISGeometry FromJSON(const FString& inputJSON, const ArcGISSpatialReference& spatialReference)

Creates a geometry from an ArcGIS JSON geometry representation.

Since 1.0.0

Arguments
NameTypeConstSummary
inputJSON
Yes

JSON representation of geometry.

spatialReference
Yes

The geometry's spatial reference.

Returns ArcGISGeometry

Geometry converted from a JSON String.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.