SFGGeometry

Objective-C

@interface SFGGeometry : SFGGeoJSONObject

Swift

class SFGGeometry : SFGGeoJSONObject

Geometry

  • Initialize

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()

    Return Value

    new geometry

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithCoordinates:(NSArray *)coordinates;

    Swift

    init!(coordinates: [Any]!)

    Parameters

    coordinates

    coordinate positions

    Return Value

    new geometry

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithTree:(NSDictionary *)tree;

    Swift

    init!(tree: [AnyHashable : Any]!)

    Parameters

    tree

    JSON tree

    Return Value

    new geometry

  • Get the geometry type

    Declaration

    Objective-C

    - (enum SFGGeometryType)geometryType;

    Swift

    func geometryType() -> SFGGeometryType

    Return Value

    geometry type

  • Get the simple geometry

    Declaration

    Objective-C

    - (SFGeometry *)geometry;

    Swift

    func geometry() -> SFGeometry!

    Return Value

    simple geometry

  • Get the JSON object coordinates

    Declaration

    Objective-C

    - (NSArray *)coordinates;

    Swift

    func coordinates() -> [Any]!

    Return Value

    coordinates

  • Set the coordinates

    Declaration

    Objective-C

    - (void)setCoordinates:(NSArray *)coordinates;

    Swift

    func setCoordinates(_ coordinates: [Any]!)

    Parameters

    coordinates

    coordinate positions

  • Get the JSON object coordinates from the JSON tree

    Declaration

    Objective-C

    + (NSArray *)treeCoordinates:(NSDictionary *)tree;

    Swift

    class func treeCoordinates(_ tree: [AnyHashable : Any]!) -> [Any]!

    Return Value

    coordinates