class GeoJSONWriter extends java.lang.Object implements Writer
Write a Feature to GeoJSON.
Schema schema = new Schema("houses", [new Field("geom","Point"), new Field("name","string"), new Field("price","float")]) Feature feature = new Feature([new Point(111,-47), "House", 12.5], "house1", schema) GeoJSONWriter writer = new GeoJSONWriter() String json = writer.write(feature) {"type":"Feature","geometry":{"type":"Point","coordinates":[111,-47]},"properties":{"name":"House","price":12.5},"id":"house1"}
Constructor and description |
---|
GeoJSONWriter() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Write a Feature to a GeoJSON String.
options
- Optional named parameters:
feature
- The Feature