public class GeoJsonReader
extends java.lang.Object
| 构造器和说明 |
|---|
GeoJsonReader()
The default constructor uses the SRID from the Geojson CRS and the
default
PrecisionModel to create a
GeometryFactory. |
GeoJsonReader(com.vividsolutions.jts.geom.GeometryFactory geometryFactory)
This constructor accepts a
GeometryFactory that is used
to create the output geometries and to override the GeoJson CRS. |
public GeoJsonReader()
PrecisionModel to create a
GeometryFactory. If there is no CRS specified then the default
CRS is a geographic coordinate reference system, using the WGS84 datum, and
with longitude and latitude units of decimal degrees (SRID = 4326)public GeoJsonReader(com.vividsolutions.jts.geom.GeometryFactory geometryFactory)
GeometryFactory that is used
to create the output geometries and to override the GeoJson CRS.geometryFactory - a GeometryFactorypublic com.vividsolutions.jts.geom.Geometry read(java.lang.String json)
throws com.vividsolutions.jts.io.ParseException
Geometry.json - The GeoJson String to parsecom.vividsolutions.jts.io.ParseException - throws a ParseException if the JSON string cannot be parsedpublic com.vividsolutions.jts.geom.Geometry read(java.io.Reader reader)
throws com.vividsolutions.jts.io.ParseException
Reader into a single
Geometry.reader - The input sourcecom.vividsolutions.jts.io.ParseException - throws a ParseException if the JSON string cannot be parsed