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 StringgetFormatName()StringtoString(Shape shape)Write a shape to Stringprotected voidwrite(Writer output, NumberFormat nf, double... coords)voidwrite(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:
getFormatNamein 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:ShapeWriterWrite a shape to the output writer- Specified by:
writein interfaceShapeWriter- Throws:
IOException
-
toString
public String toString(Shape shape)
Description copied from interface:ShapeWriterWrite a shape to String- Specified by:
toStringin interfaceShapeWriter
-
-