SFGFeatureConverter
Objective-C
@interface SFGFeatureConverter : NSObject
Swift
class SFGFeatureConverter : NSObject
Feature Converter
-
Convert the JSON string to a feature
Declaration
Objective-C
+ (SFGFeature *)jsonToFeature:(NSString *)json;Swift
class func json(toFeature json: String!) -> SFGFeature!Parameters
jsonJSON string
Return Value
feature
-
Convert the JSON tree to a feature
Declaration
Objective-C
+ (SFGFeature *)treeToFeature:(NSDictionary *)tree;Swift
class func tree(toFeature tree: [AnyHashable : Any]!) -> SFGFeature!Parameters
treetree node
Return Value
feature
-
Convert a simple geometry to a feature
Declaration
Objective-C
+ (SFGFeature *)simpleGeometryToFeature:(SFGeometry *)simpleGeometry;Swift
class func simpleGeometry(toFeature simpleGeometry: SFGeometry!) -> SFGFeature!Parameters
simpleGeometrysimple geometry
Return Value
feature
-
Convert the JSON string to a feature collection
Declaration
Objective-C
+ (SFGFeatureCollection *)jsonToFeatureCollection:(NSString *)json;Swift
class func json(toFeatureCollection json: String!) -> SFGFeatureCollection!Parameters
jsonJSON string
Return Value
feature collection
-
Convert the JSON tree to a feature collection
Declaration
Objective-C
+ (SFGFeatureCollection *)treeToFeatureCollection:(NSDictionary *)tree;Swift
class func tree(toFeatureCollection tree: [AnyHashable : Any]!) -> SFGFeatureCollection!Parameters
treetree node
Return Value
feature collection
-
Convert a simple geometry to a feature collection
Declaration
Objective-C
+ (SFGFeatureCollection *)simpleGeometryToFeatureCollection: (SFGeometry *)simpleGeometry;Swift
class func simpleGeometry(toFeatureCollection simpleGeometry: SFGeometry!) -> SFGFeatureCollection!Parameters
simpleGeometrysimple geometry
Return Value
feature collection
-
Convert simple geometries to a feature collection
Declaration
Objective-C
+ (SFGFeatureCollection *)simpleGeometriesToFeatureCollection: (NSArray<SFGeometry *> *)simpleGeometries;Swift
class func simpleGeometries(toFeatureCollection simpleGeometries: [SFGeometry]!) -> SFGFeatureCollection!Parameters
simpleGeometriessimple geometries
Return Value
feature collection
-
Convert the string content to a GeoJSON object
Declaration
Objective-C
+ (SFGGeoJSONObject *)jsonToObject:(NSString *)json;Swift
class func json(toObject json: String!) -> SFGGeoJSONObject!Parameters
jsonJSON string
Return Value
GeoJSON object
-
Convert the JSON tree to a GeoJSON Object
Declaration
Objective-C
+ (SFGGeoJSONObject *)treeToObject:(NSDictionary *)tree;Swift
class func tree(toObject tree: [AnyHashable : Any]!) -> SFGGeoJSONObject!Parameters
treeJSON tree
Return Value
GeoJSON object
-
Convert the string content to a simple geometry
Declaration
Objective-C
+ (SFGeometry *)jsonToSimpleGeometry:(NSString *)json;Swift
class func json(toSimpleGeometry json: String!) -> SFGeometry!Parameters
jsonJSON string
Return Value
simple geometry
-
Convert the JSON tree to a simple geometry
Declaration
Objective-C
+ (SFGeometry *)treeToSimpleGeometry:(NSDictionary *)tree;Swift
class func tree(toSimpleGeometry tree: [AnyHashable : Any]!) -> SFGeometry!Parameters
treeJSON tree
Return Value
simple geometry
-
Convert the GeoJSON object to a simple geometry
Declaration
Objective-C
+ (SFGeometry *)objectToSimpleGeometry:(SFGGeoJSONObject *)geoJson;Swift
class func object(toSimpleGeometry geoJson: SFGGeoJSONObject!) -> SFGeometry!Parameters
geoJsonGeoJSON object
Return Value
simple geometry
-
Convert the object to a JSON value
Declaration
Objective-C
+ (NSString *)objectToJSON:(SFGGeoJSONObject *)object;Swift
class func object(toJSON object: SFGGeoJSONObject!) -> String!Parameters
objectobject
Return Value
string value
-
Convert the simple geometry to a JSON value
Declaration
Objective-C
+ (NSString *)simpleGeometryToJSON:(SFGeometry *)simpleGeometry;Swift
class func simpleGeometry(toJSON simpleGeometry: SFGeometry!) -> String!Parameters
simpleGeometrysimple geometry
Return Value
string value
-
Convert the JSON tree to a JSON string
Declaration
Objective-C
+ (NSString *)treeToJSON:(id)object;Swift
class func tree(toJSON object: Any!) -> String!Parameters
objectJSON object
Return Value
JSON string
-
Convert the GeoJSON object to a mutable tree
Declaration
Objective-C
+ (NSMutableDictionary *)objectToMutableTree:(SFGGeoJSONObject *)object;Swift
class func object(toMutableTree object: SFGGeoJSONObject!) -> NSMutableDictionary!Parameters
objectGeoJSON object
Return Value
object map
-
Convert the GeoJSON object to a tree
Declaration
Objective-C
+ (NSDictionary *)objectToTree:(SFGGeoJSONObject *)object;Swift
class func object(toTree object: SFGGeoJSONObject!) -> [AnyHashable : Any]!Parameters
objectGeoJSON object
Return Value
object map
-
Convert the JSON string to a mutable JSON tree
Declaration
Objective-C
+ (NSMutableDictionary *)jsonToMutableTree:(NSString *)json;Swift
class func json(toMutableTree json: String!) -> NSMutableDictionary!Parameters
jsonJSON string
Return Value
tree
-
Convert the JSON string to a JSON tree
Declaration
Objective-C
+ (NSDictionary *)jsonToTree:(NSString *)json;Swift
class func json(toTree json: String!) -> [AnyHashable : Any]!Parameters
jsonJSON string
Return Value
tree
-
Convert the simple geometry to a mutable tree
Declaration
Objective-C
+ (NSMutableDictionary *)simpleGeometryToMutableTree: (SFGeometry *)simpleGeometry;Swift
class func simpleGeometry(toMutableTree simpleGeometry: SFGeometry!) -> NSMutableDictionary!Parameters
simpleGeometrysimple geometry
Return Value
object map
-
Convert the simple geometry to a tree
Declaration
Objective-C
+ (NSDictionary *)simpleGeometryToTree:(SFGeometry *)simpleGeometry;Swift
class func simpleGeometry(toTree simpleGeometry: SFGeometry!) -> [AnyHashable : Any]!Parameters
simpleGeometrysimple geometry
Return Value
object map
-
Convert the JSON string to a geometry
Declaration
Objective-C
+ (SFGGeometry *)jsonToGeometry:(NSString *)json;Swift
class func json(toGeometry json: String!) -> SFGGeometry!Parameters
jsonJSON string
Return Value
geometry
-
Convert the JSON tree to a geometry
Declaration
Objective-C
+ (SFGGeometry *)treeToGeometry:(NSDictionary *)tree;Swift
class func tree(toGeometry tree: [AnyHashable : Any]!) -> SFGGeometry!Parameters
treeJSON tree
Return Value
geometry
-
Convert the simple geometry to a geometry
Declaration
Objective-C
+ (SFGGeometry *)simpleGeometryToGeometry:(SFGeometry *)simpleGeometry;Swift
class func simpleGeometry(to simpleGeometry: SFGeometry!) -> SFGGeometry!Parameters
simpleGeometrysimple geometry
Return Value
geometry
-
Convert the JSON tree to a line string
Declaration
Objective-C
+ (SFGLineString *)treeToLineString:(NSDictionary *)tree;Swift
class func tree(toLineString tree: [AnyHashable : Any]!) -> SFGLineString!Parameters
treeJSON tree
Return Value
line string
-
Convert the JSON tree to a polygon
Declaration
Objective-C
+ (SFGPolygon *)treeToPolygon:(NSDictionary *)tree;Swift
class func tree(toPolygon tree: [AnyHashable : Any]!) -> SFGPolygon!Parameters
treeJSON tree
Return Value
polygon
-
Convert the JSON tree to a multi point
Declaration
Objective-C
+ (SFGMultiPoint *)treeToMultiPoint:(NSDictionary *)tree;Swift
class func tree(toMultiPoint tree: [AnyHashable : Any]!) -> SFGMultiPoint!Parameters
treeJSON tree
Return Value
multi point
-
Convert the JSON tree to a multi line string
Declaration
Objective-C
+ (SFGMultiLineString *)treeToMultiLineString:(NSDictionary *)tree;Swift
class func tree(toMultiLineString tree: [AnyHashable : Any]!) -> SFGMultiLineString!Parameters
treeJSON tree
Return Value
multi line string
-
Convert the JSON tree to a multi polygon
Declaration
Objective-C
+ (SFGMultiPolygon *)treeToMultiPolygon:(NSDictionary *)tree;Swift
class func tree(toMultiPolygon tree: [AnyHashable : Any]!) -> SFGMultiPolygon!Parameters
treeJSON tree
Return Value
multi polygon
-
Convert the JSON tree to a geometry collection
Declaration
Objective-C
+ (SFGGeometryCollection *)treeToGeometryCollection:(NSDictionary *)tree;Swift
class func tree(toGeometryCollection tree: [AnyHashable : Any]!) -> SFGGeometryCollection!Parameters
treeJSON tree
Return Value
geometry collection
View on GitHub
SFGFeatureConverter Class Reference