ArcGISGeometryBuilder

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

Summary

Geometry builders are used to create and modify geometries incrementally.

Properties

PropertyTypeNullableReadonlySummary
No
Yes

The extent of the geometry being constructed in the geometry builder.

No
Yes

True if the geometry builder currently contains any curve segments, false otherwise.

No
Yes

True if the geometry builder supports geometries with m values, false otherwise.

No
Yes

True if the geometry builder supports geometries with z values, false otherwise.

No
Yes

True if no coordinates have been added to this geometry builder, false otherwise.

No
Yes

True if the geometry builder contains sufficient points to show a valid graphical sketch, false otherwise.

Yes
No

The spatial reference for the geometry.

Extent

ArcGISEnvelope GetExtent() const

The extent of the geometry being constructed in the geometry builder.

HasCurves

bool GetHasCurves() const

True if the geometry builder currently contains any 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, such as Mobile Map Packages (MMPKs), or geometry JSON.

You can use curves in an ArcGISMultipartBuilder. New segment types, such as ArcGISCubicBezierSegment and ArcGISEllipticArcSegment, represent types of curve that can be added to polygon and polyline geometries.

HasM

bool GetHasM() const

True if the geometry builder supports geometries with m values, false otherwise.

M values are often referred to as measures, and are used in linear referencing workflows on linear datasets. NaN is a valid m value. If true, m values are stored for each vertex of the constructed geometry. Geometries with m values are created by using setters or constructors that accept an m value as a parameter.

HasZ

bool GetHasZ() const

True if the geometry builder supports geometries with z values, false otherwise.

Z values are generally used as a z coordinate, indicating height or elevation. NaN is a valid z value. If true, z values are stored for each vertex of the constructed geometry. Geometries with z values are created by using setters or constructors that accept a z value as a parameter.

IsEmpty

bool GetIsEmpty() const

True if no coordinates have been added to this geometry builder, false otherwise.

An empty geometry builder may have a valid ArcGISSpatialReference, even without coordinates.

IsSketchValid

bool GetIsSketchValid() const

True if the geometry builder contains sufficient points to show a valid graphical sketch, false otherwise.

This can be used as an initial lightweight check to see if the current state of a builder produces a non-empty geometry. For example, it may be used to enable or disable functionality in an editing user interface. The exact requirements vary depending on the type of geometry produced by the builder:

Note that this is not equivalent to topological simplicity, which is enforced by ArcGISGeometryEngine::Simplify and checked using ArcGISGeometryEngine::IsSimple. Geometries must be topologically simple to be successfully saved in a geodatabase or used in some service operations.

It does not check the spatial reference and returns false if an error occurs.

SpatialReference

ArcGISSpatialReference GetSpatialReference() const

The spatial reference for the geometry.

Once set, the ArcGISSpatialReference of the geometry builder cannot be changed. Ensure that all objects added to the builder have a compatible ArcGISSpatialReference.

Methods

SignatureReturn TypeSummary

Create(const ArcGISGeometry&)

ArcGISGeometryBuilder

Creates a geometry builder with the specified geometry as a starting point for further modification.

Create(ArcGISGeometryType, const ArcGISSpatialReference&)

ArcGISGeometryBuilder

Creates an empty geometry builder that builds geometries of the specified ArcGISGeometryType.

ReplaceGeometry(const ArcGISGeometry&)

void

Replaces the geometry currently stored in the geometry builder with the new geometry.

ToGeometry()

ArcGISGeometry

Returns the geometry this geometry builder is constructing or modifying.

Create

static ArcGISGeometryBuilder Create(const ArcGISGeometry& geometry)

Creates a geometry builder with the specified geometry as a starting point for further modification.

Since 1.0.0

Arguments
NameTypeConstSummary
geometry
Yes

The geometry to use as the starting point for further modifications.

Returns ArcGISGeometryBuilder

A new geometry builder.

Create

static ArcGISGeometryBuilder Create(ArcGISGeometryType geometryType, const ArcGISSpatialReference& spatialReference)

Creates an empty geometry builder that builds geometries of the specified ArcGISGeometryType.

Since 1.0.0

Arguments
NameTypeConstSummary
geometryType
No

The builder's geometry type.

spatialReference
Yes

The builder's spatial reference.

Returns ArcGISGeometryBuilder

A new geometry builder.

ReplaceGeometry

void ReplaceGeometry(const ArcGISGeometry& geometry)

Replaces the geometry currently stored in the geometry builder with the new geometry.

Since 1.0.0

Arguments
NameTypeConstSummary
geometry
Yes

A geometry object.

Returns void

ToGeometry

ArcGISGeometry ToGeometry() const

Returns the geometry this geometry builder is constructing or modifying.

Since 1.0.0

Returns ArcGISGeometry

A geometry. This is passed to geometry functions.

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