ArcGIS Runtime SDK for iOS
100.15
|
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.
AGSSketchEditor
to construct or modify geometries interactively by sketching on a map. 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 | |
AGSPoint * | center |
double | depth |
AGSEnvelope * | extent |
AGSGeometryType | geometryType |
BOOL | hasCurves |
BOOL | hasM |
BOOL | hasZ |
double | height |
double | mMax |
double | mMin |
AGSSpatialReference * | spatialReference |
double | width |
double | xMax |
double | xMin |
double | yMax |
double | yMin |
double | zMax |
double | zMin |
+ (AGSGeometryBuilder*) builderWithGeometry: | (nullable AGSGeometry *) | geometry |
Factory method to create a geometry builder from a geometry.
geometry | The geometry to be used as the starting point for further modifications. |
AGSGeometryBuilder::hasCurves
+ (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.
geometryType | The type of geometry to be constructed. |
sr | The spatial reference for the geometry to be constructed. |
AGSGeometryBuilder::hasCurves
- (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.
point | to center at. |
- (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.
size | to reaspect the envelope. |
+ (instancetype) envelopeBuilderWithCenter: | (AGSPoint *) | center | |
width: | (double) | width | |
height: | (double) | height | |
Initializes an envelope builder with the provided center and dimensions.
center | The coordinates of the envelope's center. |
width | of the envelope (in units specified by the center's spatial reference). |
height | of the envelope (in units specified by the center's spatial reference). |
+ (instancetype) envelopeBuilderWithCenter: | (AGSPoint *) | center | |
width: | (double) | width | |
height: | (double) | height | |
depth: | (double) | depth | |
Initializes an envelope builder with the provided center and dimensions.
center | The coordinates of the envelope's center. |
width | of the envelope (in units specified by the center's spatial reference). |
height | of the envelope (in units specified by the center's spatial reference). |
depth | of the envelope (in meters). |
+ (instancetype) envelopeBuilderWithEnvelope: | (nullable AGSEnvelope *) | envelope |
Initializes an envelope builder with the provided envelope.
envelope | The geometry to be used as the starting point for further modifications. Can be nil. |
+ (instancetype) envelopeBuilderWithSpatialReference: | (nullable AGSSpatialReference *) | sr |
Initializes an empty envelope builder.
sr | The spatial reference for the geometry to be constructed. |
- (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.
factor | The factor to scale envelope by. |
- (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.
factor | The factor to scale envelope by. |
anchorPoint | A point within the envelope to expand from. |
- (instancetype) initWithCenter: | (AGSPoint *) | center | |
width: | (double) | width | |
height: | (double) | height | |
Initializes an envelope builder with the provided center and dimensions.
center | The coordinates of the envelope's center. |
width | of the envelope (in units specified by the center's spatial reference). |
height | of the envelope (in units specified by the center's spatial reference). |
- (instancetype) initWithCenter: | (AGSPoint *) | center | |
width: | (double) | width | |
height: | (double) | height | |
depth: | (double) | depth | |
Initializes an envelope builder with the provided center and dimensions.
center | The coordinates of the envelope's center. |
width | of the envelope (in units specified by the center's spatial reference). |
height | of the envelope (in units specified by the center's spatial reference). |
depth | of the envelope (in meters). |
- (instancetype) initWithEnvelope: | (nullable AGSEnvelope *) | envelope |
Initializes an envelope builder with the provided envelope.
envelope | The geometry to be used as the starting point for further modifications. Can be nil. |
- (instancetype) initWithSpatialReference: | (nullable AGSSpatialReference *) | sr |
Initializes an empty envelope builder.
sr | The spatial reference for the geometry to be constructed. |
- (BOOL) isEmpty |
Indicates whether the builder's geometry is empty.
AGSGeometry::isEmpty
- (instancetype) offsetByX: | (double) | offsetX | |
y: | (double) | offsetY | |
Move the builder's envelope geometry.
offsetX | offset along x-axis (negative value moves the envelope east) |
offsetY | offset along y-axis (negative value moves the envelope south) |
- (instancetype) replaceGeometry: | (nullable AGSEnvelope *) | geometry |
Replaces the builder's geometry with the provided one.
geometry | to replace with |
- (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.
geometry | The geometry object to replace with. |
- (instancetype) setMMin: | (double) | mMin | |
mMax: | (double) | mMax | |
Updates the builder's envelope geometry with given coordinates.
mMin | The min measure value. |
mMax | The max measure value. |
- (instancetype) setXMin: | (double) | xMin | |
yMin: | (double) | yMin | |
xMax: | (double) | xMax | |
yMax: | (double) | yMax | |
Updates the builder's envelope geometry with given coordinates.
xMin | The min coordinate along x-axis (lower left corner). |
yMin | The min coordinate along y-axis (lower left corner). |
xMax | The max coordinate along x-axis (upper right corner). |
yMax | The max coordinate along y-axis (upper right corner). |
- (instancetype) setZMin: | (double) | zMin | |
zMax: | (double) | zMax | |
Updates the builder's envelope geometry with given coordinates.
zMin | The min coordinate along z-axis. |
zMax | The max coordinate along z-axis. |
- (AGSEnvelope*) toGeometry |
Returns the envelope geometry this builder is constructing or modifying.
Implements AGSGeometryBuilder.
- (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.
envelope | to union with. |
- (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.
point | to union with. |
- (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.
|
readnonatomicstrong |
The geographic center of the builder's envelope.
|
readnonatomicassign |
|
readnonatomicstronginherited |
Smallest, rectangular bounding-box that covers the builder's geometry.
AGSGeometry::extent
|
readnonatomicassigninherited |
The type of geometry the builder will construct or modify.
|
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 (where AGSSegment::curve
is YES
, 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.
|
readnonatomicassigninherited |
Indicates whether the builder's geometry contains m (measure) values.
AGSGeometry::hasM
|
readnonatomicassigninherited |
Indicates whether the builder's geometry contains z coordinate values.
AGSGeometry::hasZ
|
readnonatomicassign |
The height of the builder's envelope (along y-axis).
|
readwritenonatomicassign |
The max measure value of the builder's envelope geometry.
|
readwritenonatomicassign |
The min measure value of the builder's envelope geometry.
|
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.
AGSGeometry::spatialReference
|
readnonatomicassign |
The width of the builder's envelope (along x-axis).
|
readwritenonatomicassign |
The max coordinate of the builder's envelope geometry along x-axis (upper right corner).
|
readwritenonatomicassign |
The min coordinate of the builder's envelope geometry along x-axis (lower left corner).
|
readwritenonatomicassign |
The max coordinate of the builder's envelope geometry along y-axis (upper right corner).
|
readwritenonatomicassign |
The min coordinate of the builder's envelope geometry along y-axis (lower left corner).
|
readwritenonatomicassign |
The max coordinate of the builder's envelope geometry along z-axis. Only applicable for 3D envelope geometries.
|
readwritenonatomicassign |
The min coordinate of the builder's envelope geometry along z-axis. Only applicable for 3D envelope geometries.