NTGeoJSONGeometryReader


@interface NTGeoJSONGeometryReader : NSObject {
  void *swigCPtr;
  BOOL swigCMemOwn;
}

A GeoJSON parser. Parser supports Geometry, Feature and FeatureCollection inputs.

  • Constructs a new GeoJSONGeometryReader object.

    Declaration

    Objective-C

    - (id)init;
  • Returns the current target projection. If target projection is set, all geometry coordinates will be converted from WGS84 to target projection coordinate system.

    Declaration

    Objective-C

    - (NTProjection *)getTargetProjection;

    Return Value

    The current target projection or null.

  • Sets the current target projection. If target projection is set, all geometry coordinates will be converted from WGS84 to target projection coordinate system.

    Declaration

    Objective-C

    - (void)setTargetProjection:(NTProjection *)proj;

    Parameters

    proj

    The new target projection or null.

  • Reads geometry from the specified GeoJSON string.

    Warning

    Throws NSException If string could not be parsed.

    Declaration

    Objective-C

    - (NTGeometry *)readGeometry:(NSString *)geoJSON;

    Parameters

    geoJSON

    The GeoJSON string to read.

    Return Value

    The geometry read from the string.

  • Reads feature from the specified GeoJSON string.

    Warning

    Throws NSException If string could not be parsed.

    Declaration

    Objective-C

    - (NTFeature *)readFeature:(NSString *)geoJSON;

    Parameters

    geoJSON

    The GeoJSON string to read.

    Return Value

    The feature read from the string.

  • Reads feature collection from the specified GeoJSON string.

    Warning

    Throws NSException If string could not be parsed.

    Declaration

    Objective-C

    - (NTFeatureCollection *)readFeatureCollection:(NSString *)geoJSON;

    Parameters

    geoJSON

    The GeoJSON string to read.

    Return Value

    The feature collection read from the string.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;