ArcGISGeometryBuilder
Namespace: GameEngine.Geometry
Class: GameEngine/Geometry/ArcGISGeometryBuilder
Since: 1.0.0
Summary
A geometry builder object
Properties
Property | Type | Nullable | Readonly | Summary |
---|---|---|---|---|
No | Yes | The extent for the geometry in the builder. | ||
No | Yes | A value indicating whether the geometry builder currently contains any curve segments. | ||
No | Yes | A value indicating if the geometry builder has M. | ||
No | Yes | A value indicating if the geometry builder has Z. | ||
No | Yes | Check if a geometry builder is empty or not. | ||
No | Yes | Check if a geometry builder contains sufficient points to show a valid graphical sketch. | ||
Yes | No | The spatial reference for the geometry. |
Extent
ArcGISEnvelope Extent
The extent for the geometry in the builder.
The extent for the geometry in the builder which is a envelope and contains the same spatial reference as the input geometry.
HasCurves
bool HasCurves
A value indicating whether the geometry builder currently contains any curve segments.
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 (MMPKs), or geometry JSON.
Prior to v100.12, only ArcGISLineSegment instances were supported when creating new geometries using a ArcGISMultipartBuilder. Attempting to add curve geometries to a ArcGISMultipartBuilder would cause an error.
From v100.12, you can use curves in a ArcGISMultipartBuilder. New segment types ArcGISCubicBezierSegment and ArcGISEllipticArcSegment represent different types of curve that can be added to polygon and polyline geometries.
HasM
bool HasM
A value indicating if the geometry builder has M.
If an error occurs false is returned. M is a vertex value that is stored with the geometry builder.
HasZ
bool HasZ
A value indicating if the geometry builder has Z.
If an error occurs false is returned. Z typically represent elevations or heights.
IsEmpty
bool IsEmpty
Check if a geometry builder is empty or not.
Only check the geometry builder to see if it is empty. Does not check the spatial reference. Returns true if an error occurs.
IsSketchValid
bool IsSketchValid
Check if a geometry builder contains sufficient points to show a valid graphical sketch.
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:
- A ArcGISPointBuilder must contain non-NaN x,y coordinates
- A ArcGISMultipointBuilder must contain at least one valid Point
- An ArcGISEnvelopeBuilder must contain non-NaN minimum and maximum x,y coordinates
- A 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
- A ArcGISPolygonBuilder must contain at least one ArcGISMutablePart. Each ArcGISMutablePart it contains must have:
- 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.
Does not check the spatial reference. Returns false if an error occurs.
Prior to v100.8, only one part of a multipart polygon or polyline was required to have the minimum number (2 for a polyline, 3 for a polygon) of points, and only ArcGISLineSegment instances were supported in builders.
Prior to v100.12, a ArcGISPolygonBuilder required at least three valid Points in each ArcGISMutablePart, and at least one part.
SpatialReference
ArcGISSpatialReference SpatialReference
The spatial reference for the geometry.
If the geometry does not have a spatial reference null is returned.
Methods
Signature | Return Type | Summary |
---|---|---|
Creates a geometry builder using the geometry provided as a starting point for further modifications. | ||
Creates a geometry builder which builds geometries of the given type. | ||
Replaces the geometry in the builder with the new geometry. | ||
Creates a geometry with the values in the geometry builder. |
Create
static ArcGISGeometryBuilder Create(ArcGISGeometry geometry)
Creates a geometry builder using the geometry provided as a starting point for further modifications.
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 a geometry builder which builds geometries of the given type.
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 in the builder with the new geometry.
Since 1.0.0
Arguments
Name | Type | Summary |
---|---|---|
geometry | The geometry object. |
Returns void
ToGeometry
ArcGISGeometry ToGeometry()
Creates a geometry with the values in the geometry builder.
Since 1.0.0
Returns ArcGISGeometry
A geometry. This is passed to geometry functions.