GPKGGeometryUtils
Objective-C
@interface GPKGGeometryUtils : NSObject
Swift
class GPKGGeometryUtils : NSObject
Geometry Utilities
-
Returns the area of a closed path on Earth.
Written from the Android SphericalUtil implementation.
Declaration
Objective-C
+ (double)computeAreaOfDegreesPath:(NSArray<SFPoint *> *)path;Swift
class func computeArea(ofDegreesPath path: [SFPoint]!) -> DoubleParameters
pathA closed path in degree units.
Return Value
The path’s area in square meters.
-
Returns the signed area of a closed path on Earth. The sign of the area may be used to determine the orientation of the path. “inside” is the surface that does not contain the South Pole.
Written from the Android SphericalUtil implementation.
Declaration
Objective-C
+ (double)computeSignedAreaOfDegreesPath:(NSArray<SFPoint *> *)path;Swift
class func computeSignedArea(ofDegreesPath path: [SFPoint]!) -> DoubleParameters
pathA closed path in degree units.
Return Value
The loop’s area in square meters.
-
Check if the polygon points create a closed polygon with the first and last points at the same location
Declaration
Objective-C
+ (BOOL)isClosedPolygonWithPoints:(NSArray<SFPoint *> *)points;Swift
class func isClosedPolygon(with points: [SFPoint]!) -> BoolParameters
pointspolygon points
Return Value
true if points create a closed polygon
-
Convert degrees to radians
Declaration
Objective-C
+ (double)toRadiansWithDegrees:(double)degrees;Swift
class func toRadians(withDegrees degrees: Double) -> DoubleParameters
degreesvalue in degrees
Return Value
radians
-
Convert radians to degrees
Declaration
Objective-C
+ (double)toDegreesWithRadians:(double)radians;Swift
class func toDegrees(withRadians radians: Double) -> DoubleParameters
radiansvalue in radians
Return Value
degrees
View on GitHub
GPKGGeometryUtils Class Reference