Namespace: GameEngine.Geometry
Class: GameEngine/Geometry/ArcGISGeometryBuilder
Since: 1.0.0
Summary
Geometry builders allow you to create and modify geometries incrementally.
Properties
Property | Type | Nullable | Readonly | Summary |
---|---|---|---|---|
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. |
HasCurves
bool HasCurves
True if the geometry builder currently contains any curve segments, false otherwise.
ArcGIS 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 HasM
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 HasZ
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 IsEmpty
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 IsSketchValid
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:
- An ArcGISPointBuilder must contain non-NaN x,y coordinates
- An ArcGISMultipointBuilder must contain at least one valid ArcGISPoint
- An ArcGISEnvelopeBuilder must contain non-NaN minimum and maximum x,y coordinates
- An ArcGISPolylineBuilder must contain at least one ArcGISMutablePart. Each ArcGISMutablePart it contains must have:
- At least two valid points, or
- At least one ArcGISSegment where ArcGISSegment.IsCurve is true
- An ArcGISPolygonBuilder must contain at least one
Mutable
ArcGISMutablePart it contains must have:Part. Each - At least three valid points, or
- At least one ArcGISSegment where ArcGISSegment.IsCurve is true.
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 SpatialReference
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
Signature | Return Type | Summary |
---|---|---|
Creates a geometry builder with the specified geometry as a starting point for further modification. | ||
Creates an empty geometry builder which builds geometries of the specified ArcGISGeometryType. | ||
Replaces the geometry currently stored in the geometry builder with the new geometry. | ||
Returns ArcGISGeometry that the geometry builder is constructing or modifying. |
Create
static ArcGISGeometryBuilder Create(ArcGISGeometry geometry)
Creates a geometry builder with the specified geometry as a starting point for further modification.
Since 1.0.0
Arguments
Name | Type | Summary |
---|---|---|
geometry | The geometry to use as the starting point for further modifications. |
Returns ArcGISGeometryBuilder
A new geometry builder.
Create
static ArcGISGeometryBuilder Create(ArcGISGeometryType geometryType, ArcGISSpatialReference spatialReference)
Creates an empty geometry builder which builds geometries of the specified ArcGISGeometryType.
Since 1.0.0
Arguments
Name | Type | Summary |
---|---|---|
geometry | The builder's geometry type. | |
spatial | The builder's spatial reference. |
Returns ArcGISGeometryBuilder
A new geometry builder.
ReplaceGeometry
void ReplaceGeometry(ArcGISGeometry geometry)
Replaces the geometry currently stored in the geometry builder with the new geometry.
Since 1.0.0
Arguments
Name | Type | Summary |
---|---|---|
geometry | A geometry object. |
Returns void
ToGeometry
ArcGISGeometry ToGeometry()
Returns ArcGISGeometry that the geometry builder is constructing or modifying.
Since 1.0.0
Returns ArcGISGeometry
A new geometry.