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

Description

A builder to construct or modify multipart geometries.

Instances of this class represent a builder that can construct or modify multipart geometries such as AGSPolygon and AGSPolyline which are otherwise immutable.

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

Instance Methods

(instancetype) - addPartWithPoints:
 
(instancetype) - addPoint:
 
(instancetype) - addPoints:toPartAtIndex:
 
(instancetype) - addPointWithX:y:
 
(instancetype) - addPointWithX:y:z:
 
(BOOL) - isEmpty
 
(instancetype) - replaceGeometry:
 
(AGSGeometry *) - toGeometry
 

Class Methods

(AGSGeometryBuilder *) + builderWithGeometry:
 
(AGSGeometryBuilder *) + builderWithGeometryType:spatialReference:
 

Properties

AGSEnvelopeextent
 
AGSGeometryType geometryType
 
BOOL hasCurves
 
BOOL hasM
 
BOOL hasZ
 
AGSMutablePartCollectionparts
 
AGSSpatialReferencespatialReference
 

Method Documentation

◆ addPartWithPoints:

- (instancetype) addPartWithPoints: (NSArray< AGSPoint * > *)  points

Add new part with given points to the builder's multipart geometry.

Returns
The builder so you can easily chain method calls.
Since
100

◆ addPoint:

- (instancetype) addPoint: (AGSPoint *)  point

Appends a vertex to the builder's multipart geometry.

Returns
The builder so you can easily chain method calls.
Since
100

◆ addPoints:toPartAtIndex:

- (instancetype) addPoints: (NSArray< AGSPoint * > *)  points
toPartAtIndex: (NSInteger)  partIndex 

Add points to the builder's multipart geometry at given part index.

Returns
The builder so you can easily chain method calls.
Since
100

◆ addPointWithX:y:

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

Appends a vertex to the builder's multipart geometry.

Returns
The builder so you can easily chain method calls.
Since
100

◆ addPointWithX:y:z:

- (instancetype) addPointWithX: (double)  x
y: (double)  y
z: (double)  z 

Appends a vertex to the builder's multipart geometry.

Returns
The builder so you can easily chain method calls.
Since
100

◆ 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

◆ isEmpty

- (BOOL) isEmpty

Indicates whether the builder's geometry is empty.

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

◆ replaceGeometry:

- (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

◆ toGeometry

- (AGSGeometry*) toGeometry

Returns the geometry this builder is constructing or modifying.

Returns
A new geometry object.
Since
100

Implemented in AGSPolylineBuilder, AGSPolygonBuilder, AGSPointBuilder, AGSMultipointBuilder, and AGSEnvelopeBuilder.

Property Documentation

◆ 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

◆ parts

- (AGSMutablePartCollection*) parts
readwritenonatomicstrong

The parts of the builder's geometry. Can be iterated through a for-in loop.

AGSPolygonBuilder* polygonBuilder = ... ; //builder whose polygon contains 2 parts (rings)
for (AGSMutablePart *part in polygonBuilder.parts){
...
}
AGSMutablePartCollection * parts
Definition: AGSMultipartBuilder.h:62
A mutable part of a multipart geometry.
Definition: AGSMutablePart.h:67
A builder to build polygon geometries.
Definition: AGSPolygonBuilder.h:42
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