SFCentroidSurface
Objective-C
@interface SFCentroidSurface : NSObject
Swift
class SFCentroidSurface : NSObject
Calculate the centroid from surface based geometries. Implementation based on the JTS (Java Topology Suite) CentroidArea.
-
Initialize
Declaration
Objective-C
- (instancetype)init;
Swift
init!()
Return Value
new instance
-
Initialize
Declaration
Objective-C
- (instancetype)initWithGeometry:(SFGeometry *)geometry;
Swift
init!(geometry: SFGeometry!)
Parameters
geometry
geometry to add
Return Value
new instance
-
Add a surface based dimension 2 geometry to the centroid total. Ignores dimension 0 and 1 geometries.
Declaration
Objective-C
- (void)addGeometry:(SFGeometry *)geometry;
Swift
func add(_ geometry: SFGeometry!)
Parameters
geometry
geometry
-
Get the centroid point
Return Value
centroid point