SFGeometry
Objective-C
@interface SFGeometry : NSObject <NSMutableCopying, NSSecureCoding>
Swift
class SFGeometry : NSObject, NSMutableCopying, NSSecureCoding
The root of the geometry type hierarchy
-
Geometry type
Declaration
Objective-C
@property (nonatomic) enum SFGeometryType geometryType;
Swift
var geometryType: SFGeometryType { get set }
-
Has Z values
Declaration
Objective-C
@property (nonatomic) BOOL hasZ;
Swift
var hasZ: Bool { get set }
-
Has M values
Declaration
Objective-C
@property (nonatomic) BOOL hasM;
Swift
var hasM: Bool { get set }
-
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 geometry
-
Does the geometry have z coordinates
Declaration
Objective-C
- (BOOL)is3D;
Swift
func is3D() -> Bool
Return Value
true if has z coordinates
-
Does the geometry have m coordinates.
Declaration
Objective-C
- (BOOL)isMeasured;
Swift
func isMeasured() -> Bool
Return Value
true if has m coordinates
-
Get the minimum bounding box for this Geometry
Declaration
Objective-C
- (SFGeometryEnvelope *)envelope;
Swift
func envelope() -> SFGeometryEnvelope!
Return Value
geometry envelope
-
Expand the envelope with the minimum bounding box for this Geometry
Declaration
Objective-C
- (void)expandEnvelope:(SFGeometryEnvelope *)envelope;
Swift
func expandEnvelope(_ envelope: SFGeometryEnvelope!)
Parameters
envelope
geometry envelope to expand
-
Get the inherent dimension (0, 1, or 2) for this Geometry
Declaration
Objective-C
- (int)dimension;
Swift
func dimension() -> Int32
Return Value
dimension
-
Get the mathematical centroid point of a 2 dimensional representation of the Geometry (balancing point of a 2d cutout of the geometry). Only the x and y coordinate of the resulting point are calculated and populated. The resulting SFPoint.z and SFPoint.m values will always be nil.
Return Value
centroid point
-
Get the geographic centroid point of a 2 dimensional representation of the degree unit Geometry. Only the x and y coordinate of the resulting point are calculated and populated. The resulting SFPoint.z and SFPoint.m values will always be nil.
Return Value
centroid point
-
Is the Geometry empty
Declaration
Objective-C
- (BOOL)isEmpty;
Swift
func isEmpty() -> Bool
Return Value
true if empty
-
Determine if this Geometry has no anomalous geometric points, such as self intersection or self tangency
Declaration
Objective-C
- (BOOL)isSimple;
Swift
func isSimple() -> Bool
Return Value
true if simple
-
Update currently false hasZ and hasM values using the provided geometry
Declaration
Objective-C
- (void)updateZM:(SFGeometry *)geometry;
Swift
func updateZM(_ geometry: SFGeometry!)
Parameters
geometry
geometry