Skip To Content ArcGIS for Developers Sign In Dashboard

GeometryBuilder QML Type

Base type for types used to create immutable geometries. More...

Import Statement: import Esri.ArcGISRuntime 100.6
Since: Esri.ArcGISRuntime 100.0
Inherits:

Object

Inherited By:

EnvelopeBuilder, MultipartBuilder, MultipointBuilder, and PointBuilder

Properties

Signals

Detailed Description

Note: You cannot declare or create a component of this type in QML code.

Each type of Geometry has a corresponding builder class. For example, PolygonBuilder creates Polygons. 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 setting the geometry property to the existing Geometry to be edited, and then make the required changes. In both cases, retrieve the new immutable geometry based on the current state of the geometry in the builder from the geometry property. The state of a builder can be completely overwritten by assigning an existing Geometry of the matching type to the geoemtry property.

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.

TypeDefault Property
SpatialReferencespatialReference

Property Documentation

empty : bool

Returns whether the geometry being built is currently empty (read-only).


extent : extent

Returns the extent (read-only).


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.


geometryBuilderType : Enums.GeometryBuilderType

Returns the Enums.GeometryBuilderType (read-only).


hasM : bool

Returns whether the geometry has m-values (read-only).


hasZ : bool

Returns whether the geometry has z-coordinates (read-only).


sketchValid : bool

Returns whether the geometry being built is currently valid (read-only).

Performs the following checks on the geometry in the builder:

  • For Point: Contains x and y coordinates.
  • For Polyline: Contains at least one part, each with two or more vertices.
  • For Polygon: Contains at least one part, each with three or more vertices which form a closed ring.
  • For Multipoint: Contains at least one vertex.
  • For Envelope: Contains xMin, yMin, xMax, and yMax coordinates.

[default] spatialReference : SpatialReference

The spatial reference.


Signal Documentation

geometryChanged()

Emitted when any property inherited from GeometryBuilder changes.


spatialReferenceChanged()

Emitted when the spatialReference property changes.



Feedback on this topic?