SFWBGeometryCodes

Objective-C

@interface SFWBGeometryCodes : NSObject

Swift

class SFWBGeometryCodes : NSObject

Geometry Code utilities to convert between geometry attributes and geometry codes

  • Get the geometry code from the geometry

    Declaration

    Objective-C

    + (int)codeFromGeometry:(SFGeometry *)geometry;

    Swift

    class func code(from geometry: SFGeometry!) -> Int32

    Parameters

    geometry

    geometry

    Return Value

    geometry code

  • Get the geometry code from the geometry type

    Declaration

    Objective-C

    + (int)codeFromGeometryType:(enum SFGeometryType)geometryType;

    Swift

    class func code(from geometryType: SFGeometryType) -> Int32

    Parameters

    geometryType

    geometry type

    Return Value

    geometry code

  • Get the geometry code from the geometry type

    Declaration

    Objective-C

    + (int)codeFromGeometryType:(enum SFGeometryType)geometryType
                        andHasZ:(BOOL)hasZ
                        andHasM:(BOOL)hasM;

    Swift

    class func code(from geometryType: SFGeometryType, andHasZ hasZ: Bool, andHasM hasM: Bool) -> Int32

    Parameters

    geometryType

    geometry type

    hasZ

    has z

    hasM

    mas m

    Return Value

    geometry code

  • Get the well-known binary writable geometry code from the geometry

    Declaration

    Objective-C

    + (int)wkbCodeFromGeometry:(SFGeometry *)geometry;

    Swift

    class func wkbCode(from geometry: SFGeometry!) -> Int32

    Parameters

    geometry

    geometry

    Return Value

    geometry code

  • Get the well-known binary writable geometry type from the geometry

    Declaration

    Objective-C

    + (enum SFGeometryType)wkbGeometryTypeFromGeometry:(SFGeometry *)geometry;

    Swift

    class func wkbGeometryType(from geometry: SFGeometry!) -> SFGeometryType

    Parameters

    geometry

    geometry

    Return Value

    geometry type

  • Get the Geometry Type from the code

    Declaration

    Objective-C

    + (enum SFGeometryType)geometryTypeFromCode:(int)code;

    Swift

    class func geometryType(fromCode code: Int32) -> SFGeometryType

    Parameters

    code

    geometry type code

    Return Value

    geometry type

  • Determine if the geometry code has a Z (3D) value

    Declaration

    Objective-C

    + (BOOL)hasZFromCode:(int)code;

    Swift

    class func hasZ(fromCode code: Int32) -> Bool

    Parameters

    code

    geometry code

    Return Value

    true is has Z

  • Determine if the geometry code has a M (linear referencing system) value

    Declaration

    Objective-C

    + (BOOL)hasMFromCode:(int)code;

    Swift

    class func hasM(fromCode code: Int32) -> Bool

    Parameters

    code

    geometry code

    Return Value

    true is has M

  • Get the geometry mode from the geometry code. Returns the digit in the thousands place. (z is enabled when 1 or 3, m is enabled when 2 or 3)

    Declaration

    Objective-C

    + (int)geometryModeFromCode:(int)code;

    Swift

    class func geometryMode(fromCode code: Int32) -> Int32

    Parameters

    code

    geometry code

    Return Value

    geometry mode