ArcGIS Runtime SDK for iOS: AGSPolylineBuilder Class Reference
ArcGIS Runtime SDK for iOS  100.9
AGSPolylineBuilder Class Reference

Description

A builder to build polyline geometries.

Instances of this class represent a builder that can build polyline geometries. Polyline 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 AGSPolylineBuilder:
AGSMultipartBuilder AGSGeometryBuilder AGSObject

Instance Methods

(instancetype) - addPartWithPoints:
 
(instancetype) - addPoint:
 
(instancetype) - addPoints:toPartAtIndex:
 
(instancetype) - addPointWithX:y:
 
(instancetype) - addPointWithX:y:z:
 
(instancetype) - initWithPoints:
 
(instancetype) - initWithPolyline:
 
(instancetype) - initWithSpatialReference:
 
(BOOL) - isEmpty
 
(instancetype) - replaceGeometry:
 
(instancetype) - replaceGeometry:
 
(AGSPolyline *) - toGeometry
 

Class Methods

(AGSGeometryBuilder *) + builderWithGeometry:
 
(AGSGeometryBuilder *) + builderWithGeometryType:spatialReference:
 
(instancetype) + polylineBuilderWithPoints:
 
(instancetype) + polylineBuilderWithPolyline:
 
(instancetype) + polylineBuilderWithSpatialReference:
 

Properties

AGSEnvelopeextent
 
AGSGeometryType geometryType
 
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

§ builderWithGeometryType:spatialReference:()

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

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

Parameters
geometryTypeThe type of geometry to be constructed
srThe spatial reference for the geometry to be constructed
Since
100

§ initWithPoints:()

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

Initializes a polyline builder.

Parameters
pointsfor the geometry to be constructed
Since
100

§ initWithPolyline:()

- (instancetype) initWithPolyline: (nullable AGSPolyline *)  polyline

Initializes a polyline builder.

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

§ initWithSpatialReference:()

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

Initializes a 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
YES if the geometry is empty
Since
100
See also
AGSGeometry::isEmpty

§ polylineBuilderWithPoints:()

+ (instancetype) polylineBuilderWithPoints: (NSArray< AGSPoint * > *)  points

Initializes a polyline builder.

Parameters
pointsfor the geometry to be constructed
Since
100

§ polylineBuilderWithPolyline:()

+ (instancetype) polylineBuilderWithPolyline: (nullable AGSPolyline *)  polyline

Initializes a polyline builder.

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

§ polylineBuilderWithSpatialReference:()

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

Initializes a builder.

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

§ replaceGeometry:() [1/2]

- (instancetype) replaceGeometry: (nullable AGSPolyline *)  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.

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

§ toGeometry()

- (AGSPolyline*) toGeometry

Returns the polyline geometry this builder is constructing or modifying.

Returns
geometry
Since
100

Implements AGSGeometryBuilder.

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

§ 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
readwritenonatomicstronginherited

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){
...
}
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