MSFGeoJSONGeometryWriter
Objective-C
@interface MSFGeoJSONGeometryWriter : NSObject {
void *swigCPtr;
BOOL swigCMemOwn;
}
Swift
class MSFGeoJSONGeometryWriter : NSObject
A GeoJSON writer. Generates human-readable GeoJSON representation of the geometry, feature or feature collection. Supports both 2D and 3D coordinate serialization.
-
Constructs a new GeoJSONGeometryWriter object with default settings.
Declaration
Objective-C
- (id)init;Swift
init!() -
Returns the current source projection. If source projection is set, all geometry coordinates will be converted from given coordinate system to WGS84.
Declaration
Objective-C
- (MSFProjection *)getSourceProjection;Swift
func getSourceProjection() -> MSFProjection!Return Value
The current source projection or null.
-
Sets the current source projection. If source projection is set, all geometry coordinates will be converted from given coordinate system to WGS84.
Declaration
Objective-C
- (void)setSourceProjection:(MSFProjection *)proj;Swift
func setSourceProjection(_ proj: MSFProjection!)Parameters
projThe new source projection or null.
-
Returns the state of Z coordinate serialization.
Declaration
Objective-C
- (BOOL)getZ;Swift
func getZ() -> BoolReturn Value
True if Z coordinate is stored in GeoJSON output, false otherwise. The default is false.
-
Sets the state of Z coordinate serialization.
Declaration
Objective-C
- (void)setZ:(BOOL)z;Swift
func setZ(_ z: Bool)Parameters
zTrue when Z coordinate should be serialized, false otherwise.
-
Creates a GeoJSON string corresponding to the specified geometry.
Declaration
Objective-C
- (NSString *)writeGeometry:(MSFGeometry *)geometry;Swift
func write(_ geometry: MSFGeometry!) -> String!Parameters
geometryThe geometry to write.
Return Value
The corresponding GeoJSON string. @throws NSException If string could not be generated.
-
Creates a GeoJSON string corresponding to the specified feature.
Declaration
Objective-C
- (NSString *)writeFeature:(MSFFeature *)feature;Swift
func write(_ feature: MSFFeature!) -> String!Parameters
featureThe feature to write.
Return Value
The corresponding GeoJSON string. @throws NSException If string could not be generated.
-
Creates a GeoJSON string corresponding to the specified feature collection.
Declaration
Objective-C
- (NSString *)writeFeatureCollection:(MSFFeatureCollection *)featureCollection;Swift
func write(_ featureCollection: MSFFeatureCollection!) -> String!Parameters
featureCollectionThe feature collection to write.
Return Value
The corresponding GeoJSON string. @throws NSException If string could not be generated.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;Swift
func dealloc()