CRSTextUtils
Objective-C
@interface CRSTextUtils : NSObject
Swift
class CRSTextUtils : NSObject
CRS Well-Known Text Utilities
-
Is the text a left delimiter
Declaration
Objective-C
+ (BOOL)isLeftDelimiter:(NSString *)text;
Swift
class func isLeftDelimiter(_ text: String!) -> Bool
Parameters
text
wkt text token
Return Value
true if left delimiter
-
Is the text a right delimiter
Declaration
Objective-C
+ (BOOL)isRightDelimiter:(NSString *)text;
Swift
class func isRightDelimiter(_ text: String!) -> Bool
Parameters
text
wkt text token
Return Value
true if right delimiter
-
Is the Coordinate System Type a spatial type
Declaration
Objective-C
+ (BOOL)isSpatial:(enum CRSCoordinateSystemType)type;
Swift
class func isSpatial(_ type: CRSCoordinateSystemType) -> Bool
Parameters
type
coordinate system type
Return Value
true if a spatial type
-
Is the Coordinate System Type a temporal count or measure type
Declaration
Objective-C
+ (BOOL)isTemporalCountMeasure:(enum CRSCoordinateSystemType)type;
Swift
class func isTemporalCountMeasure(_ type: CRSCoordinateSystemType) -> Bool
Parameters
type
coordinate system type
Return Value
true if a spatial type
-
Is the Coordinate System Type an ordinal or temporal date time type
Declaration
Objective-C
+ (BOOL)isOrdinalDateTime:(enum CRSCoordinateSystemType)type;
Swift
class func isOrdinalDateTime(_ type: CRSCoordinateSystemType) -> Bool
Parameters
type
coordinate system type
Return Value
true if a spatial type
-
Get the unit type from the keyword
Declaration
Objective-C
+ (enum CRSUnitType)unitTypeOfKeyword:(CRSKeyword *)keyword;
Swift
class func unitType(of keyword: CRSKeyword!) -> CRSUnitType
Parameters
keyword
coordinate reference system keyword
Return Value
unit type
-
Get the unit type from the keyword type
Declaration
Objective-C
+ (enum CRSUnitType)unitType:(enum CRSKeywordType)keyword;
Swift
class func unitType(_ keyword: CRSKeywordType) -> CRSUnitType
Parameters
keyword
coordinate reference system keyword type
Return Value
unit type
-
Get the Coordinate Reference System Type
Declaration
Objective-C
+ (enum CRSType)coordinateReferenceSystemType:(enum CRSKeywordType)keyword;
Swift
class func coordinateReferenceSystemType(_ keyword: CRSKeywordType) -> CRSType
Parameters
keyword
coordinate reference system keyword
Return Value
coordinate reference system type
-
Get an int from a string
Declaration
Objective-C
+ (int)intFromString:(NSString *)string;
Swift
class func int(from string: String!) -> Int32
Parameters
string
string int value
Return Value
integer
-
Get a double from a string
Declaration
Objective-C
+ (double)doubleFromString:(NSString *)string;
Swift
class func double(from string: String!) -> Double
Parameters
string
string double value
Return Value
double
-
Get a decimal number from a string
Declaration
Objective-C
+ (NSDecimalNumber *)decimalNumberFromString:(NSString *)string;
Swift
class func decimalNumber(from string: String!) -> NSDecimalNumber!
Parameters
string
string double value
Return Value
decimal number
-
Get text from a double
Declaration
Objective-C
+ (NSString *)textFromDouble:(double)value;
Swift
class func text(from value: Double) -> String!
Parameters
value
double value
Return Value
text value
-
Get text from a decimal number
Declaration
Objective-C
+ (NSString *)textFromDecimalNumber:(NSDecimalNumber *)decimalNumber;
Swift
class func text(from decimalNumber: NSDecimalNumber!) -> String!
Parameters
decimalNumber
decimal number value
Return Value
text value
-
Convert the WKT to a pretty WKT string, 4 space indents
Declaration
Objective-C
+ (NSString *)pretty:(NSString *)wkt;
Swift
class func pretty(_ wkt: String!) -> String!
Parameters
wkt
well-known text
Return Value
pretty wkt
-
Convert the WKT to a pretty WKT string, tab indents
Declaration
Objective-C
+ (NSString *)prettyTabIndent:(NSString *)wkt;
Swift
class func prettyTabIndent(_ wkt: String!) -> String!
Parameters
wkt
well-known text
Return Value
pretty wkt
-
Convert the WKT to a pretty WKT string, no indents
Declaration
Objective-C
+ (NSString *)prettyNoIndent:(NSString *)wkt;
Swift
class func prettyNoIndent(_ wkt: String!) -> String!
Parameters
wkt
well-known text
Return Value
pretty wkt
-
Convert the WKT to a pretty WKT string
Declaration
Objective-C
+ (NSString *)pretty:(NSString *)wkt withIndent:(NSString *)indent;
Swift
class func pretty(_ wkt: String!, withIndent indent: String!) -> String!
Parameters
wkt
well-known text
indent
indent string
Return Value
pretty wkt
-
Convert the WKT to a pretty WKT string
Declaration
Objective-C
+ (NSString *)pretty:(NSString *)wkt withNewline:(NSString *)newline andIndent:(NSString *)indent;
Swift
class func pretty(_ wkt: String!, withNewline newline: String!, andIndent indent: String!) -> String!
Parameters
wkt
well-known text
newline
newline string
indent
indent string
Return Value
pretty wkt