ArcGIS Runtime SDK for iOS: AGSEnvelopeBuilder Class Reference
ArcGIS Runtime SDK for iOS  100.12
AGSEnvelopeBuilder Class Reference

Description

The envelope builder object is used to create an envelope.

Instances of this class represent a builder that can build envelope geometries. Envelope geometries are immutable, they cannot be modified after they are created. Use builders to create new geometries either from scratch, or by using an existing geometry as a starting off point. Modifications made through the builder affect only its own internal copy of the geometry. They do not affect the original geometry.

Since
100
See also
AGSSketchEditor to construct or modify geometries interactively by sketching on a map.
Inheritance diagram for AGSEnvelopeBuilder:
AGSGeometryBuilder AGSObject

Instance Methods

(instancetype) - centerAtPoint:
 
(instancetype) - changeAspectRatio:
 
(instancetype) - expandByFactor:
 
(instancetype) - expandByFactor:withAnchorPoint:
 
(instancetype) - initWithCenter:width:height:
 
(instancetype) - initWithCenter:width:height:depth:
 
(instancetype) - initWithEnvelope:
 
(instancetype) - initWithSpatialReference:
 
(BOOL) - isEmpty
 
(instancetype) - offsetByX:y:
 
(instancetype) - replaceGeometry:
 
(instancetype) - replaceGeometry:
 
(instancetype) - setMMin:mMax:
 
(instancetype) - setXMin:yMin:xMax:yMax:
 
(instancetype) - setZMin:zMax:
 
(AGSEnvelope *) - toGeometry
 
(instancetype) - unionWithEnvelope:
 
(instancetype) - unionWithPoint:
 
(instancetype) - unionWithX:y:
 

Class Methods

(AGSGeometryBuilder *) + builderWithGeometry:
 
(AGSGeometryBuilder *) + builderWithGeometryType:spatialReference:
 
(instancetype) + envelopeBuilderWithCenter:width:height:
 
(instancetype) + envelopeBuilderWithCenter:width:height:depth:
 
(instancetype) + envelopeBuilderWithEnvelope:
 
(instancetype) + envelopeBuilderWithSpatialReference:
 

Properties

AGSPointcenter
 
double depth
 
AGSEnvelopeextent
 
AGSGeometryType geometryType
 
BOOL hasCurves
 
BOOL hasM
 
BOOL hasZ
 
double height
 
double mMax
 
double mMin
 
AGSSpatialReferencespatialReference
 
double width
 
double xMax
 
double xMin
 
double yMax
 
double yMin
 
double zMax
 
double zMin
 

Method Documentation

◆ builderWithGeometry:

+ (AGSGeometryBuilder*) builderWithGeometry: (nullable AGSGeometry *)  geometry

Factory method to create a geometry builder from a geometry.

Parameters
geometryThe geometry to be used as the starting point for further modifications.
Since
100
See also
AGSGeometryBuilder::hasCurves

◆ builderWithGeometryType:spatialReference:

+ (AGSGeometryBuilder*) builderWithGeometryType: (AGSGeometryType geometryType
spatialReference: (nullable AGSSpatialReference *)  sr 

Factory method to create a geometry builder from a geometry type and spatial reference.

Prior to v100.12, only geometries without curves could be used. Passing in a geometry where AGSGeometry::hasCurves is YES would fail to replace the geometry.

From v100.12, geometries with curves are supported.

Parameters
geometryTypeThe type of geometry to be constructed.
srThe spatial reference for the geometry to be constructed.
Since
100
See also
AGSGeometryBuilder::hasCurves

◆ centerAtPoint:

- (instancetype) centerAtPoint: (AGSPoint *)  point

Re-centers the builder's envelope geometry at the specified location. The point's spatial reference must be the same as the builder's.

Parameters
pointto center at.
Returns
The builder so you can easily chain method calls.
Since
100

◆ changeAspectRatio:

- (instancetype) changeAspectRatio: (CGSize)  size

Reaspect the builder's envelope geometry to match the given aspect ratio. The envelope's center remains unchanged, but its corners change.

Parameters
sizeto reaspect the envelope.
Returns
The builder so you can easily chain method calls.
Since
100

◆ envelopeBuilderWithCenter:width:height:

+ (instancetype) envelopeBuilderWithCenter: (AGSPoint *)  center
width: (double)  width
height: (double)  height 

Initializes an envelope builder with the provided center and dimensions.

Parameters
centerThe coordinates of the envelope's center.
widthof the envelope (in units specified by the center's spatial reference).
heightof the envelope (in units specified by the center's spatial reference).
Returns
A new envelope builder.
Since
100.1

◆ envelopeBuilderWithCenter:width:height:depth:

+ (instancetype) envelopeBuilderWithCenter: (AGSPoint *)  center
width: (double)  width
height: (double)  height
depth: (double)  depth 

Initializes an envelope builder with the provided center and dimensions.

Parameters
centerThe coordinates of the envelope's center.
widthof the envelope (in units specified by the center's spatial reference).
heightof the envelope (in units specified by the center's spatial reference).
depthof the envelope (in meters).
Returns
A new envelope builder.
Since
100.1

◆ envelopeBuilderWithEnvelope:

+ (instancetype) envelopeBuilderWithEnvelope: (nullable AGSEnvelope *)  envelope

Initializes an envelope builder with the provided envelope.

Parameters
envelopeThe geometry to be used as the starting point for further modifications. Can be nil.
Returns
A new envelope builder.
Since
100

◆ envelopeBuilderWithSpatialReference:

+ (instancetype) envelopeBuilderWithSpatialReference: (nullable AGSSpatialReference *)  sr

Initializes an empty envelope builder.

Parameters
srThe spatial reference for the geometry to be constructed.
Returns
A new envelope builder.
Since
100

◆ expandByFactor:

- (instancetype) expandByFactor: (double)  factor

Expands the builder's envelope geometry. A factor < 1.0 shrinks the envelope and > 1.0 expands it. The envelope's center remains unchanged, but its corners change. This is the same as calling expandByFactor:withAnchorPoint: with the envelope's center.

Parameters
factorThe factor to scale envelope by.
Returns
The builder so you can easily chain method calls.
Since
100

◆ expandByFactor:withAnchorPoint:

- (instancetype) expandByFactor: (double)  factor
withAnchorPoint: (AGSPoint *)  anchorPoint 

Expands the builder's envelope geometry. A factor < 1.0 shrinks the envelope and > 1.0 expands it. The specified anchor point of the envelope remains unchanged, but the envelope's corners change.

Parameters
factorThe factor to scale envelope by.
anchorPointA point within the envelope to expand from.
Returns
The builder so you can easily chain method calls.
Since
100

◆ initWithCenter:width:height:

- (instancetype) initWithCenter: (AGSPoint *)  center
width: (double)  width
height: (double)  height 

Initializes an envelope builder with the provided center and dimensions.

Parameters
centerThe coordinates of the envelope's center.
widthof the envelope (in units specified by the center's spatial reference).
heightof the envelope (in units specified by the center's spatial reference).
Since
100.1

◆ initWithCenter:width:height:depth:

- (instancetype) initWithCenter: (AGSPoint *)  center
width: (double)  width
height: (double)  height
depth: (double)  depth 

Initializes an envelope builder with the provided center and dimensions.

Parameters
centerThe coordinates of the envelope's center.
widthof the envelope (in units specified by the center's spatial reference).
heightof the envelope (in units specified by the center's spatial reference).
depthof the envelope (in meters).
Since
100.1

◆ initWithEnvelope:

- (instancetype) initWithEnvelope: (nullable AGSEnvelope *)  envelope

Initializes an envelope builder with the provided envelope.

Parameters
envelopeThe geometry to be used as the starting point for further modifications. Can be nil.
Since
100

◆ initWithSpatialReference:

- (instancetype) initWithSpatialReference: (nullable AGSSpatialReference *)  sr

Initializes an empty envelope builder.

Parameters
srThe spatial reference for the geometry to be constructed.
Since
100

◆ isEmpty

- (BOOL) isEmpty

Indicates whether the builder's geometry is empty.

Returns
If the geometry is empty.
Since
100
See also
AGSGeometry::isEmpty

◆ offsetByX:y:

- (instancetype) offsetByX: (double)  offsetX
y: (double)  offsetY 

Move the builder's envelope geometry.

Parameters
offsetXoffset along x-axis (negative value moves the envelope east)
offsetYoffset along y-axis (negative value moves the envelope south)
Returns
The builder so you can easily chain method calls.
Since
100

◆ replaceGeometry: [1/2]

- (instancetype) replaceGeometry: (nullable AGSEnvelope *)  geometry

Replaces the builder's geometry with the provided one.

Parameters
geometryto replace with
Returns
The builder so you can easily chain method calls.
Since
100

◆ replaceGeometry: [2/2]

- (instancetype) replaceGeometry: (nullable AGSGeometry *)  geometry

Replaces the builder's geometry with the provided one.

This does not update the spatial reference of the builder. If the geometry is nil, the builder is cleared.

Prior to v100.12, only geometries without curves could be used. Passing in a geometry where AGSGeometry::hasCurves is YES would fail to replace the geometry.

From v100.12, geometries with curves are supported.

Parameters
geometryThe geometry object to replace with.
Returns
The builder so you can easily chain method calls.
Since
100

◆ setMMin:mMax:

- (instancetype) setMMin: (double)  mMin
mMax: (double)  mMax 

Updates the builder's envelope geometry with given coordinates.

Parameters
mMinThe min measure value.
mMaxThe max measure value.
Returns
The builder so you can easily chain method calls.
Since
100

◆ setXMin:yMin:xMax:yMax:

- (instancetype) setXMin: (double)  xMin
yMin: (double)  yMin
xMax: (double)  xMax
yMax: (double)  yMax 

Updates the builder's envelope geometry with given coordinates.

Parameters
xMinThe min coordinate along x-axis (lower left corner).
yMinThe min coordinate along y-axis (lower left corner).
xMaxThe max coordinate along x-axis (upper right corner).
yMaxThe max coordinate along y-axis (upper right corner).
Returns
The builder so you can easily chain method calls.
Since
100

◆ setZMin:zMax:

- (instancetype) setZMin: (double)  zMin
zMax: (double)  zMax 

Updates the builder's envelope geometry with given coordinates.

Parameters
zMinThe min coordinate along z-axis.
zMaxThe max coordinate along z-axis.
Returns
The builder so you can easily chain method calls.
Since
100

◆ toGeometry

- (AGSEnvelope*) toGeometry

Returns the envelope geometry this builder is constructing or modifying.

Returns
geometry
Since
100

Implements AGSGeometryBuilder.

◆ unionWithEnvelope:

- (instancetype) unionWithEnvelope: (AGSEnvelope *)  envelope

Unions the builder's envelope with the given envelope. The envelope's spatial reference must be the same as the builder's.

Parameters
envelopeto union with.
Returns
The builder so you can easily chain method calls.
Since
100

◆ unionWithPoint:

- (instancetype) unionWithPoint: (AGSPoint *)  point

Unions the builder's envelope geometry with the given point. The point's spatial reference must be the same as the builder's.

Parameters
pointto union with.
Returns
The builder so you can easily chain method calls.
Since
100

◆ unionWithX:y:

- (instancetype) unionWithX: (double)  x
y: (double)  y 

Unions the builder's envelope geometry with the given X and Y coordinates. The coordinates are assumed to be in the same spatial reference as the builder's.

Since
100.5

Property Documentation

◆ center

- (AGSPoint*) center
readnonatomicstrong

The geographic center of the builder's envelope.

Since
100

◆ depth

- (double) depth
readnonatomicassign

◆ extent

- (AGSEnvelope*) extent
readnonatomicstronginherited

Smallest, rectangular bounding-box that covers the builder's geometry.

Since
100
See also
AGSGeometry::extent

◆ geometryType

- (AGSGeometryType) geometryType
readnonatomicassigninherited

The type of geometry the builder will construct or modify.

Since
100

◆ hasCurves

- (BOOL) hasCurves
readnonatomicassigninherited

A value indicating whether the geometry builder currently contains any curve segments.

The ArcGIS Platform supports polygon and polyline geometries that contain curve segments (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 AGSLineSegment instances were supported when creating new geometries using an AGSMultipartBuilder. Attempting to add curve geometries to an AGSMultipartBuilder would cause an error.

From v100.12, you can use curves in an AGSMultipartBuilder. New segment types AGSCubicBezierSegment and AGSEllipticArcSegment represent different types of curve that can be added to polygon and polyline geometries.

See also
AGSMutablePart::hasCurves, AGSGeometry::hasCurves, AGSSegment::curve
Since
100.12

◆ hasM

- (BOOL) hasM
readnonatomicassigninherited

Indicates whether the builder's geometry contains m (measure) values.

Since
100
See also
AGSGeometry::hasM

◆ hasZ

- (BOOL) hasZ
readnonatomicassigninherited

Indicates whether the builder's geometry contains z coordinate values.

Since
100
See also
AGSGeometry::hasZ

◆ height

- (double) height
readnonatomicassign

The height of the builder's envelope (along y-axis).

Since
100

◆ mMax

- (double) mMax
readwritenonatomicassign

The max measure value of the builder's envelope geometry.

Since
100

◆ mMin

- (double) mMin
readwritenonatomicassign

The min measure value of the builder's envelope geometry.

Since
100

◆ spatialReference

- (AGSSpatialReference*) spatialReference
readnonatomicstronginherited

The spatial reference associated with the builder's gometry. It specifies the coordinate system for the geometry's x, y, and z coordinate values.

Since
100
Note
Geometries that represent geographic locations should always have a spatial reference. Otherwise the coordinates of the geometry are meaningless.
See also
AGSGeometry::spatialReference

◆ width

- (double) width
readnonatomicassign

The width of the builder's envelope (along x-axis).

Since
100

◆ xMax

- (double) xMax
readwritenonatomicassign

The max coordinate of the builder's envelope geometry along x-axis (upper right corner).

Since
100

◆ xMin

- (double) xMin
readwritenonatomicassign

The min coordinate of the builder's envelope geometry along x-axis (lower left corner).

Since
100

◆ yMax

- (double) yMax
readwritenonatomicassign

The max coordinate of the builder's envelope geometry along y-axis (upper right corner).

Since
100

◆ yMin

- (double) yMin
readwritenonatomicassign

The min coordinate of the builder's envelope geometry along y-axis (lower left corner).

Since
100

◆ zMax

- (double) zMax
readwritenonatomicassign

The max coordinate of the builder's envelope geometry along z-axis. Only applicable for 3D envelope geometries.

Since
100

◆ zMin

- (double) zMin
readwritenonatomicassign

The min coordinate of the builder's envelope geometry along z-axis. Only applicable for 3D envelope geometries.

Since
100