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

Description

Defines common members for polyline and polygon multipart geometries.

Multipart geometry is comprised of a collection of shapes (of the same type) that is managed as a single geometry. A classic example is a set of islands that represent a single country or state. The individual island shapes are distinct, but ArcGIS considers it a single geometry.

AGSPolygon and AGSPolyline inherit from AGSMultipart, which in turn inherits from AGSGeometry. AGSMultipart provides access to the geometry's AGSPartCollection. Each AGSPart in the collection is a collection of AGSSegment objects. You can iterate through the segments or points in each part.

In the same way as AGSPolygon and AGSPolyline are immutable, their multipart collections are also immutable: AGSPartCollection, AGSPart, and AGSPointCollection. However, when creating polygons and polylines, use the mutable equivalents: AGSMutablePartCollection, AGSMutablePart, and AGSMutablePointCollection.

Since
100
Inheritance diagram for AGSMultipart:
AGSGeometry AGSObject <AGSJSONSerializable> AGSPolygon AGSPolyline

Instance Methods

(BOOL) - isEqualToGeometry:
 
(BOOL) - isEqualToGeometry:tolerance:
 
(AGSGeometryBuilder *) - toBuilder
 
(nullable id) - toJSON:
 

Class Methods

(nullable id< AGSJSONSerializable >) + fromJSON:error:
 

Properties

AGSGeometryDimension dimension
 
BOOL empty
 
AGSEnvelopeextent
 
AGSGeometryType geometryType
 
BOOL hasCurves
 
BOOL hasM
 
BOOL hasZ
 
AGSPartCollectionparts
 
AGSSpatialReferencespatialReference
 
NSDictionary< NSString *, id > * unknownJSON
 
NSDictionary< NSString *, id > * unsupportedJSON
 

Method Documentation

§ fromJSON:error:()

+ (nullable id<AGSJSONSerializable>) fromJSON: (id)  JSONObject
error: (NSError **)  error 
staticrequiredinherited

Initializes and returns an object from its JSON representation.

Parameters
JSONObjectNSDictionary or NSArray containing the JSON.
errorencountered during the operation, if any.
Since
100

§ isEqualToGeometry:()

- (BOOL) isEqualToGeometry: (AGSGeometry *)  other

Compares whether two geometries are equal.

Parameters
othergeometry to compare this geometry to
Returns
YES if the geometries are equal
Since
100

§ isEqualToGeometry:tolerance:()

- (BOOL) isEqualToGeometry: (AGSGeometry *)  other
tolerance: (double)  tolerance 

§ toBuilder()

- (AGSGeometryBuilder*) toBuilder

Returns a builder using a copy of this geometry as a starting off point. The builder can be used to make modifications to the geometry.

Returns
builder
Since
100
Note
Any changes you make using the builder modifies its own internal copy of the geometry. It does not affect this geometry.

Implemented in AGSEnvelope, AGSPoint, AGSPolyline, AGSMultipoint, and AGSPolygon.

§ toJSON:()

- (nullable id) toJSON: (NSError **)  error
requiredinherited

Returns JSON representation for this object.

Parameters
errorencountered during the operation, if any.
Returns
NSDictionary or NSArray containing the JSON.
Since
100

Reimplemented in AGSPortalItem.

Property Documentation

§ dimension

- (AGSGeometryDimension) dimension
readnonatomicassigninherited

§ empty

- (BOOL) empty
readnonatomicassigninherited

Indicates whether this geometry has any vertices.

Since
100

§ extent

- (AGSEnvelope*) extent
readnonatomicstronginherited

Smallest, rectangular bounding-box that covers the geometry.

Since
100

§ geometryType

- (AGSGeometryType) geometryType
readnonatomicassigninherited

The type of this geometry.

Since
100

§ hasCurves

- (BOOL) hasCurves
readnonatomicassigninherited

Indicates whether this geometry has curves.

Since
100

§ hasM

- (BOOL) hasM
readnonatomicassigninherited

Indicates whether this geometry contains m (measure) values.

Since
100

§ hasZ

- (BOOL) hasZ
readnonatomicassigninherited

Indicates whether this geometry contains z coordinate values. Only 3D geometries contain z values.

Since
100

§ parts

- (AGSPartCollection*) parts
readnonatomicstrong

The parts of this geometry.

Can be iterated through a for-in loop.

AGSPolygon* polygon = ... ; //polygon with 2 parts (rings)
for (AGSPart* part in polygon.parts) {
...
}
Since
100

§ spatialReference

- (AGSSpatialReference*) spatialReference
readnonatomicstronginherited

The spatial reference associated with the 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.

§ unknownJSON

- (NSDictionary<NSString*,id>*) unknownJSON
readrequirednonatomiccopyinherited

A dictionary of values that was in the source JSON but was unparsed by API.

Returns
NSDictionary containing the unknown JSON.
Since
100

§ unsupportedJSON

- (NSDictionary<NSString*,id>*) unsupportedJSON
readnonatomiccopyinherited

A dictionary of values that are supported by the REST API, but not exposed through the SDK API.

Returns
NSDictionary containing the unsupported JSON.
Since
100