Base type for types used to create immutable geometries. More...
|Import Statement:||import Esri.ArcGISRuntime 100.9|
- empty : bool
- extent : extent
- geometry : Geometry
- geometryBuilderType : Enums.GeometryBuilderType
- 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).
Returns whether the builder's geometry 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.
- A PolylineBuilder must contain at least two valid Points in each Part, and at least one part.
- A PolygonBuilder must contain at least three valid Points in each Part, and at least one part.
- An EnvelopeBuilder must contain non-NaN minimum and maximum x and y values.
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.
[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