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 |
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. |
Returns:
a Geometry or Feature/FeatureCollection representation.
- Type
- Geometry | Object