SFGeometryCollection

Objective-C

@interface SFGeometryCollection : SFGeometry

Swift

class SFGeometryCollection : SFGeometry

A collection of zero or more Geometry instances.

  • Array of geometries

    Declaration

    Objective-C

    @property (nonatomic, strong) NSMutableArray<SFGeometry *> *geometries;

    Swift

    var geometries: NSMutableArray! { get set }
  • Create

    Declaration

    Objective-C

    + (SFGeometryCollection *)geometryCollection;

    Return Value

    new geometry collection

  • Create

    Declaration

    Objective-C

    + (SFGeometryCollection *)geometryCollectionWithHasZ:(BOOL)hasZ
                                                 andHasM:(BOOL)hasM;

    Parameters

    hasZ

    has z values

    hasM

    has m values

    Return Value

    new geometry collection

  • Create

    Declaration

    Objective-C

    + (SFGeometryCollection *)geometryCollectionWithGeometries:
        (NSMutableArray<SFGeometry *> *)geometries;

    Parameters

    geometries

    list of geometries

    Return Value

    new geometry collection

  • Create

    Declaration

    Objective-C

    + (SFGeometryCollection *)geometryCollectionWithGeometry:(SFGeometry *)geometry;

    Parameters

    geometry

    geometry

    Return Value

    new geometry collection

  • Create

    Declaration

    Objective-C

    + (SFGeometryCollection *)geometryCollectionWithGeometryCollection:
        (SFGeometryCollection *)geometryCollection;

    Parameters

    geometryCollection

    geometry ollection

    Return Value

    new geometry collection

  • Initialize

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()

    Return Value

    new geometry collection

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithHasZ:(BOOL)hasZ andHasM:(BOOL)hasM;

    Swift

    init!(hasZ: Bool, andHasM hasM: Bool)

    Parameters

    hasZ

    has z values

    hasM

    has m values

    Return Value

    new geometry collection

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithGeometries:(NSMutableArray<SFGeometry *> *)geometries;

    Swift

    init!(geometries: NSMutableArray!)

    Parameters

    geometries

    list of geometries

    Return Value

    new geometry collection

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithGeometry:(SFGeometry *)geometry;

    Swift

    init!(geometry: SFGeometry!)

    Parameters

    geometry

    geometry

    Return Value

    new geometry collection

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithType:(enum SFGeometryType)geometryType
                         andHasZ:(BOOL)hasZ
                         andHasM:(BOOL)hasM;

    Swift

    init!(type geometryType: SFGeometryType, andHasZ hasZ: Bool, andHasM hasM: Bool)

    Parameters

    geometryType

    geometry type

    hasZ

    has z values

    hasM

    has m values

    Return Value

    new geometry collection

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithGeometryCollection:
        (SFGeometryCollection *)geometryCollection;

    Swift

    init!(geometryCollection: SFGeometryCollection!)

    Parameters

    geometryCollection

    geometry ollection

    Return Value

    new geometry collection

  • Add geometry

    Declaration

    Objective-C

    - (void)addGeometry:(SFGeometry *)geometry;

    Swift

    func addGeometry(_ geometry: SFGeometry!)

    Parameters

    geometry

    geometry

  • Add geometries

    Declaration

    Objective-C

    - (void)addGeometries:(NSArray<SFGeometry *> *)geometries;

    Swift

    func addGeometries(_ geometries: [SFGeometry]!)

    Parameters

    geometries

    geometries

  • Get the number of geometries

    Declaration

    Objective-C

    - (int)numGeometries;

    Swift

    func numGeometries() -> Int32

    Return Value

    geometry count

  • Returns the Nth geometry

    Declaration

    Objective-C

    - (SFGeometry *)geometryAtIndex:(int)n;

    Swift

    func geometry(at n: Int32) -> SFGeometry!

    Parameters

    n

    nth geometry to return

    Return Value

    geometry

  • Get the collection type by evaluating the geometries

    Declaration

    Objective-C

    - (enum SFGeometryType)collectionType;

    Swift

    func collectionType() -> SFGeometryType

    Return Value

    collection geometry type, one of: MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, MULTICURVE, MULTISURFACE, GEOMETRYCOLLECTION

  • Determine if this geometry collection is a MultiPoint instance or contains only Point geometries

    Declaration

    Objective-C

    - (BOOL)isMultiPoint;

    Swift

    func isMultiPoint() -> Bool

    Return Value

    true if a multi point or contains only points

  • Get as a MultiPoint, either the current instance or newly created from the Point geometries

    Declaration

    Objective-C

    - (SFMultiPoint *)asMultiPoint;

    Swift

    func asMultiPoint() -> SFMultiPoint!

    Return Value

    multi point

  • Determine if this geometry collection is a MultiLineString instance or contains only LineString geometries

    Declaration

    Objective-C

    - (BOOL)isMultiLineString;

    Swift

    func isMultiLineString() -> Bool

    Return Value

    true if a multi line string or contains only line strings

  • Get as a MultiLineString, either the current instance or newly created from the LineString geometries

    Declaration

    Objective-C

    - (SFMultiLineString *)asMultiLineString;

    Swift

    func asMultiLineString() -> SFMultiLineString!

    Return Value

    multi line string

  • Determine if this geometry collection is a MultiPolygon instance or contains only Polygon geometries

    Declaration

    Objective-C

    - (BOOL)isMultiPolygon;

    Swift

    func isMultiPolygon() -> Bool

    Return Value

    true if a multi polygon or contains only polygons

  • Get as a MultiPolygon, either the current instance or newly created from the Polygon geometries

    Declaration

    Objective-C

    - (SFMultiPolygon *)asMultiPolygon;

    Swift

    func asMultiPolygon() -> SFMultiPolygon!

    Return Value

    multi polygon

  • Determine if this geometry collection contains only Curve geometries

    Declaration

    Objective-C

    - (BOOL)isMultiCurve;

    Swift

    func isMultiCurve() -> Bool

    Return Value

    true if contains only curves

  • Get as a Multi Curve, a Curve typed Geometry Collection

    Declaration

    Objective-C

    - (SFGeometryCollection *)asMultiCurve;

    Swift

    func asMultiCurve() -> SFGeometryCollection!

    Return Value

    multi curve

  • Determine if this geometry collection contains only Surface geometries

    Declaration

    Objective-C

    - (BOOL)isMultiSurface;

    Swift

    func isMultiSurface() -> Bool

    Return Value

    true if contains only surfaces

  • Get as a Multi Surface, a Surface typed Geometry Collection

    Declaration

    Objective-C

    - (SFGeometryCollection *)asMultiSurface;

    Swift

    func asMultiSurface() -> SFGeometryCollection!

    Return Value

    multi surface

  • Get as a top level Geometry Collection

    Declaration

    Objective-C

    - (SFGeometryCollection *)asGeometryCollection;

    Swift

    func `as`() -> SFGeometryCollection!

    Return Value

    geometry collection