public class GeoJsonWriter
extends java.lang.Object
Geometrys as JSON fragments in GeoJson format.| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static java.lang.String |
EPSG_PREFIX |
| 构造器 | 说明 |
|---|---|
GeoJsonWriter() |
Constructs a GeoJsonWriter instance.
|
GeoJsonWriter(int decimals) |
Constructs a GeoJsonWriter instance specifying the number of decimals to
use when encoding floating point numbers.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
setEncodeCRS(boolean isEncodeCRS) |
|
java.lang.String |
write(org.locationtech.jts.geom.Geometry geometry) |
Writes a
Geometry in GeoJson format to a String. |
void |
write(org.locationtech.jts.geom.Geometry geometry,
java.io.Writer writer) |
Writes a
Geometry in GeoJson format into a Writer. |
public static final java.lang.String EPSG_PREFIX
public GeoJsonWriter()
public GeoJsonWriter(int decimals)
public void setEncodeCRS(boolean isEncodeCRS)
public java.lang.String write(org.locationtech.jts.geom.Geometry geometry)
Geometry in GeoJson format to a String.geometry - public void write(org.locationtech.jts.geom.Geometry geometry,
java.io.Writer writer)
throws java.io.IOException
Geometry in GeoJson format into a Writer.geometry - Geometry to encodewriter - Stream to encode to.java.io.IOException - throws an IOException when unable to write the JSON stringCopyright © 2019. All rights reserved.