Class: module:org/locationtech/jts/io/GeoJSONReader

module:org/locationtech/jts/io/GeoJSONReader(geometryFactory)

new module:org/locationtech/jts/io/GeoJSONReader(geometryFactory)

A GeoJSONReader is parameterized by a GeometryFactory, to allow it to create Geometry objects of the appropriate implementation. In particular, the GeometryFactory determines the PrecisionModel and SRID that is used.

Parameters:
Name Type Description
geometryFactory GeometryFactory
Source:

Methods

read(geoJson) → {Geometry|Object}

Reads a GeoJSON representation of a Geometry

Will also parse GeoJSON Features/FeatureCollections as custom objects.

Parameters:
Name Type Description
geoJson Object | String

a GeoJSON Object or String.

Source:
Returns:

a Geometry or Feature/FeatureCollection representation.

Type
Geometry | Object