ArcGISGeometryBuilder

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

Summary

Geometry builders allow you to create and modify geometries incrementally.

Properties

PropertyTypeNullableReadonlySummary
No
Yes

The extent for 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 for 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).

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 take 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 take 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 verify if a builder's current state 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 which 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 ArcGISGeometry that the 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 which 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 ArcGISGeometry that the geometry builder is constructing or modifying.

Since 1.0.0

Returns ArcGISGeometry

A new geometry.

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