SFPolygon
Objective-C
@interface SFPolygon : SFCurvePolygon
Swift
class SFPolygon : SFCurvePolygon
A restricted form of CurvePolygon where each ring is defined as a simple, closed LineString.
-
Create
Declaration
Objective-C
+ (SFPolygon *)polygon;
Return Value
new polygon
-
Create
Declaration
Objective-C
+ (SFPolygon *)polygonWithHasZ:(BOOL)hasZ andHasM:(BOOL)hasM;
Parameters
hasZ
has z values
hasM
has m values
Return Value
new polygon
-
Create
Declaration
Objective-C
+ (SFPolygon *)polygonWithRings:(NSMutableArray<SFLineString *> *)rings;
Parameters
rings
list of rings
Return Value
new polygon
-
Create
Declaration
Objective-C
+ (SFPolygon *)polygonWithRing:(SFLineString *)ring;
Parameters
ring
ring
Return Value
new polygon
-
Create
Declaration
Objective-C
+ (SFPolygon *)polygonWithPolygon:(SFPolygon *)polygon;
Parameters
polygon
polygon
Return Value
new polygon
-
Initialize
Declaration
Objective-C
- (instancetype)init;
Swift
init!()
Return Value
new polygon
-
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 polygon
-
Initialize
Declaration
Objective-C
- (instancetype)initWithRings:(NSMutableArray<SFLineString *> *)rings;
Swift
init!(rings: NSMutableArray!)
Parameters
rings
list of rings
Return Value
new polygon
-
Initialize
Declaration
Objective-C
- (instancetype)initWithRing:(SFLineString *)ring;
Swift
init!(ring: SFLineString!)
Parameters
ring
ring
Return Value
new polygon
-
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 polygon
-
Initialize
Declaration
Objective-C
- (instancetype)initWithPolygon:(SFPolygon *)polygon;
Swift
init!(polygon: SFPolygon!)
Parameters
polygon
polygon
Return Value
new polygon
-
Get the line string rings
Declaration
Objective-C
- (NSMutableArray<SFLineString *> *)lineStrings;
Swift
func lineStrings() -> NSMutableArray!
Return Value
line string rings
-
Set the line string rings
Declaration
Objective-C
- (void)setRings:(NSMutableArray<SFLineString *> *)rings;
Swift
func setRings(_ rings: NSMutableArray!)
Parameters
rings
line string rings
-
Returns the Nth ring where the exterior ring is at 0, interior rings begin at 1
Declaration
Objective-C
- (SFLineString *)ringAtIndex:(int)n;
Swift
func ring(at n: Int32) -> SFLineString!
Parameters
n
nth ring to return
Return Value
ring
-
Get the exterior ring
Return Value
exterior ring
-
Returns the Nth interior ring for this Polygon
Declaration
Objective-C
- (SFLineString *)interiorRingAtIndex:(int)n;
Swift
func interiorRing(at n: Int32) -> SFLineString!
Parameters
n
interior ring number
Return Value
interior ring