SFGPolygon
Objective-C
@interface SFGPolygon : SFGGeometry
Swift
class SFGPolygon : SFGGeometry
Polygon
-
Array of line string rings
Declaration
Objective-C
@property (nonatomic, strong) NSMutableArray<SFGLineString *> *rings;
Swift
var rings: NSMutableArray! { get set }
-
Create
Declaration
Objective-C
+ (SFGPolygon *)polygon;
Return Value
new polygon
-
Create
Declaration
Objective-C
+ (SFGPolygon *)polygonWithCoordinates:(NSArray *)coordinates;
Parameters
coordinates
coordinate positions
Return Value
new polygon
-
Create
Declaration
Objective-C
+ (SFGPolygon *)polygonWithRings:(NSArray<SFGLineString *> *)rings;
Parameters
rings
ring line string list
Return Value
new polygon
-
Create
Declaration
Objective-C
+ (SFGPolygon *)polygonWithPolygon:(SFPolygon *)polygon;
Parameters
polygon
simple polygon
Return Value
new polygon
-
Create
Declaration
Objective-C
+ (SFGPolygon *)polygonWithTree:(NSDictionary *)tree;
Parameters
tree
JSON tree
Return Value
new polygon
-
Initialize
Declaration
Objective-C
- (instancetype)init;
Swift
init!()
Return Value
new polygon
-
Initialize
Declaration
Objective-C
- (instancetype)initWithCoordinates:(NSArray *)coordinates;
Swift
init!(coordinates: [Any]!)
Parameters
coordinates
coordinate positions
Return Value
new polygon
-
Initialize
Declaration
Objective-C
- (instancetype)initWithRings:(NSArray<SFGLineString *> *)rings;
Swift
init!(rings: [SFGLineString]!)
Parameters
rings
ring line string list
Return Value
new polygon
-
Initialize
Declaration
Objective-C
- (instancetype)initWithTree:(NSDictionary *)tree;
Swift
init!(tree: [AnyHashable : Any]!)
Parameters
tree
JSON tree
Return Value
new polygon
-
Get the simple polygon
Return Value
polygon