Package org.locationtech.spatial4j.io
Class GeoJSONWriter
- java.lang.Object
-
- org.locationtech.spatial4j.io.GeoJSONWriter
-
- All Implemented Interfaces:
ShapeIO
,ShapeWriter
- Direct Known Subclasses:
JtsGeoJSONWriter
public class GeoJSONWriter extends Object implements ShapeWriter
-
-
Constructor Summary
Constructors Constructor Description GeoJSONWriter(SpatialContext ctx, SpatialContextFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFormatName()
String
toString(Shape shape)
Write a shape to Stringprotected void
write(Writer output, NumberFormat nf, double... coords)
void
write(Writer output, Shape shape)
Write a shape to the output writer
-
-
-
Constructor Detail
-
GeoJSONWriter
public GeoJSONWriter(SpatialContext ctx, SpatialContextFactory factory)
-
-
Method Detail
-
getFormatName
public String getFormatName()
- Specified by:
getFormatName
in interfaceShapeIO
- Returns:
- the format name
-
write
protected void write(Writer output, NumberFormat nf, double... coords) throws IOException
- Throws:
IOException
-
write
public void write(Writer output, Shape shape) throws IOException
Description copied from interface:ShapeWriter
Write a shape to the output writer- Specified by:
write
in interfaceShapeWriter
- Throws:
IOException
-
toString
public String toString(Shape shape)
Description copied from interface:ShapeWriter
Write a shape to String- Specified by:
toString
in interfaceShapeWriter
-
-