TTGeoJSONPolygon
@interface TTGeoJSONPolygon : TTGeoJSONObject
A Geometry type comprising one or more LineStrings. The exterior ring represents the outer edges of a polygon and is a LineStrings of at least four Positions in counterclockwise order. The interior rings (0 or more) - LineStrings of at least four Positions in clockwise order - define holes in the polygon. In all cases the first and the last position in a LineString contain identical values.
-
Creates an instance of Polygon without a bounding box, with provided exterior ring and insterior rings.
Declaration
Objective-C
- (instancetype _Nonnull) initWithExteriorRing:(TTGeoJSONLineString *_Nonnull)exteriorRing withInteriorRings:(NSArray<TTGeoJSONLineString *> *_Nonnull)interiorRings withBoundingBox:(TTBoundingBox *_Nullable)boundingBox;
Swift
init(exteriorRing: TTGeoJSONLineString, withInteriorRings interiorRings: [TTGeoJSONLineString], with boundingBox: TTBoundingBox?)
Parameters
boundingBox
a bounding box encompassing this Polygon
exteriorRing
the exterior ring, definiting the outline of this Polygon
interiorRings
a collection of interior rings, defining the holes in this Polygon
Return Value
TTGeoJSONPolygon
-
Object of TTGeoJSONLineString.
Declaration
Objective-C
@property (readonly, strong, nonatomic) TTGeoJSONLineString *_Nonnull exteriorRing;
Swift
var exteriorRing: TTGeoJSONLineString { get }
-
Array of TTGeoJSONLineString objects.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSArray<TTGeoJSONLineString *> *_Nonnull interiorRings;
Swift
var interiorRings: [TTGeoJSONLineString] { get }