EnvelopeBuilder

The envelope builder object is used to create an envelope.

Since

200.1.0

Constructors

Link copied to clipboard
constructor(envelope: Envelope?, block: EnvelopeBuilder.() -> Unit = {})

Creates an envelope builder from a envelope.

constructor(spatialReference: SpatialReference? = null, block: EnvelopeBuilder.() -> Unit = {})

Creates an envelope builder.

constructor(center: Point, width: Double, height: Double, depth: Double? = null, block: EnvelopeBuilder.() -> Unit = {})

Creates an envelope builder from a center point, width, height, depth, and configuration lambda.

Properties

Link copied to clipboard

The center point for the envelope builder. Creates a new Point that must be destroyed.

Link copied to clipboard

The depth for the envelope builder or null if the builder does not have z-values.

Link copied to clipboard

The height for the envelope builder. The width for the envelope builder. Returns NAN if an error occurs.

Link copied to clipboard

The m maximum value for the envelope. Returns NAN if an error occurs.

Link copied to clipboard

The m minimum value for the envelope. Returns NAN if an error occurs.

Link copied to clipboard

The width for the envelope builder. Returns NAN if an error occurs.

Link copied to clipboard

The x maximum value for the envelope. Returns NAN if an error occurs.

Link copied to clipboard

The x minimum value for the envelope. Returns NAN if an error occurs.

Link copied to clipboard

The y maximum value for the envelope. Returns NAN if an error occurs.

Link copied to clipboard

The y minimum value for the envelope. Returns NAN if an error occurs.

Link copied to clipboard

The z maximum value for the envelope. Returns NAN if an error occurs.

Link copied to clipboard

The z minimum value for the envelope. Returns NAN if an error occurs.

Inherited properties

Link copied to clipboard

The extent for the geometry in the builder. The extent for the geometry in the builder which is an envelope and contains the same spatial reference as the input geometry.

Link copied to clipboard

A value indicating whether the geometry builder currently contains any curve segments. ArcGIS software supports polygon and polyline geometries that contain curve segments (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.

Link copied to clipboard

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.

Link copied to clipboard

A value indicating if the geometry builder has Z. If an error occurs false is returned. Z typically represent elevations or heights.

Link copied to clipboard

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.

Link copied to clipboard

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:

Link copied to clipboard

The spatial reference for the geometry. If the geometry does not have a spatial reference null is returned.

Functions

Link copied to clipboard
fun centerAt(point: Point)

Centers the envelope over the given point.

Link copied to clipboard
fun changeAspectRatio(width: Double, height: Double)

Adjust the envelope's aspect ratio to match the ratio of the given width and height. The operation preserves the center of the envelope and only increases either height or width, not both. If the new width would be greater than the old, the width is changed and the height remains the same. If the new width would be less than or equal to the old, the height is changed and the width remains the same.

Link copied to clipboard
fun expand(factor: Double)

Expands the envelope by the given scale factor.

fun expand(anchor: Point, factor: Double)

Expands the envelope at the anchor point by the given factor.

Link copied to clipboard
fun offsetBy(x: Double, y: Double)

Offsets the envelope by the given offsets for the x and y dimension.

Link copied to clipboard
open override fun replaceGeometry(geometry: Envelope?)

Replaces the geometry in the builder with the new geometry. This does not update the spatial reference of the builder. If the geometry is null, the builder is cleared.

Link copied to clipboard
fun setM(mMin: Double, mMax: Double)

Set the m-values for the envelope.

Link copied to clipboard
fun setXy(xMin: Double, yMin: Double, xMax: Double, yMax: Double)

Set the x,y coordinates for the envelope.

Link copied to clipboard
fun setZ(zMin: Double, zMax: Double)

Set the z-values for the envelope.

Link copied to clipboard
open override fun toGeometry(): Envelope

Creates a geometry with the values in the geometry builder.

Link copied to clipboard
fun union(envelope: Envelope)

Finds the union of this envelope and the given envelope and updates the envelope builder with the result.

fun union(point: Point)

Finds the union of this envelope and the given point and updates the envelope builder with the result.