GeometryBuilder QML Type
Base type for types used to create immutable geometries. More...
|Import Statement:||import Esri.ArcGISRuntime 100.13|
- empty : bool
- extent : extent
- geometry : Geometry
- geometryBuilderType : Enums.GeometryBuilderType
- hasCurves : bool
- hasM : bool
- hasZ : bool
- sketchValid : bool
- spatialReference : SpatialReference
Note: You cannot declare or create a component of this type in QML code.
Each type of Geometry has a corresponding builder type. For example, PolygonBuilder creates Polygons and EnvelopeBuilder creates Envelopes. Create a new empty builder in order to build up the shape of a geometry step by step. Alternatively for editing workflows, initialize the builder by passing the existing Geometry to be edited into the builder constructor, and then make the required changes. In both cases, call toGeometry to return a new immutable Geometry based on the current state of the geometry in the builder.
Set the spatial reference of a builder either explicitly by specifying a SpatialReference object in the constructor, or is set implicitly from other constructor arguments. Once set, the spatial reference cannot be changed. When building geometries, the spatial reference of any objects or coordinates added to the builder must be compatible with the spatial reference of the builder; added items are not reprojected. The spatial reference of added objects may be null, in which case the added object is assumed to have the same spatial reference as the builder it is added to.
A number of other methods provide information about the geometry currently being constructed. A new builder will be empty (empty is true). The hasZ and hasM methods indicate if the builder allows adding z and m-values for each coordinate in the geometry.
This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.
geometry : Geometry
The Geometry this builder operates on.
You can get the geometry at any time by using this property.
You can reset the geometry in this builder by assigning a geometry to this property. However, you cannot change the geometry type for a builder by assigning a different type of geometry. For example you cannot assign a Polygon to a PointBuilder.
You may also set the geometry property to
null which will reset it to an empty geometry. Note that it will not return null after that but rather a valid geometry with the empty property
true. Setting the geometry to
null will not change the spatial reference property.
Returns the Enums.GeometryBuilderType (read-only).
A value indicating whether the geometry builder currently contains any curve segments (read-only).
The ArcGIS Platform supports polygon and polyline geometries that contain (where Segment::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 Esri.ArcGISRuntime 100.12, only LineSegment instances were supported when creating new geometries using a MultipartBuilder. Attempting to add curve geometries to a MultipartBuilder would cause an error.
From Esri.ArcGISRuntime 100.12, you can use curves in a a MultipartBuilder. New segment types CubicBezierSegment and EllipticArcSegment represent different types of curve that can be added to polygon and polyline geometries.
This property was introduced in Esri.ArcGISRuntime 100.12.
Check if a geometry builder contains sufficient points to show a valid graphical sketch (read-only).
This can be used as an initial lightweight check to see if the current state of a builder will produce 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 PointBuilder must contain non-NaN x,y coordinates.
- A MultipointBuilder must contain at least one valid Point.
- An EnvelopeBuilder must contain non-NaN minimum and maximum x and y values.
- A PolylineBuilder must contain at least two valid points in each Part, and at least one Part.
- A PolygonBuilder must contain:
- If GeometryBuilder does not contain curve segments: at least three valid Points in each Part, and at least one Part.
- If GeometryBuilder contains does curve segments: at least one curve Segment in each Part that contains curves, or at least three valid points in each Part that does not contain curves, and at least one Part.
Note that this is not equivalent to topological simplicity, which is enforced by GeometryEngine::simplify(Geometry) and checked using GeometryEngine::isSimple(Geometry). Geometries must be topologically simple to be successfully saved in a geodatabase or used in some service operations.
Does not check the spatial reference. Will return
false if an error occurs.
Prior to Esri.ArcGISRuntime 100.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 LineSegment instances were supported in builders.
[default] spatialReference : SpatialReference
The spatial reference.
Emitted when any property inherited from GeometryBuilder changes.
Note: The corresponding handler is
Emitted when the spatialReference property changes.
Note: The corresponding handler is