org.openstreetmap.josm.io
Class GeoJSONWriter

java.lang.Object
  extended by org.openstreetmap.josm.io.GeoJSONWriter
All Implemented Interfaces:
Visitor

public class GeoJSONWriter
extends java.lang.Object
implements Visitor


Field Summary
private  boolean insertComma
           
private  OsmDataLayer layer
           
private  java.lang.StringBuilder out
           
private  boolean skipEmptyNodes
           
 
Constructor Summary
GeoJSONWriter(OsmDataLayer layer)
           
 
Method Summary
protected  void appendCoord(LatLon c)
           
protected  void appendPrimitive(OsmPrimitive p)
           
protected  java.lang.String escape(java.lang.String s)
           
 void visit(Changeset cs)
          Visiting call for changesets.
 void visit(Node n)
          Visiting call for points.
 void visit(Relation e)
          Visiting call for relations.
 void visit(Way w)
          Visiting call for lines.
 java.lang.String write()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

layer

private OsmDataLayer layer

out

private java.lang.StringBuilder out

skipEmptyNodes

private final boolean skipEmptyNodes
See Also:
Constant Field Values

insertComma

private boolean insertComma
Constructor Detail

GeoJSONWriter

public GeoJSONWriter(OsmDataLayer layer)
Method Detail

write

public java.lang.String write()

visit

public void visit(Node n)
Description copied from interface: Visitor
Visiting call for points.

Specified by:
visit in interface Visitor
Parameters:
n - The node to inspect.

visit

public void visit(Way w)
Description copied from interface: Visitor
Visiting call for lines.

Specified by:
visit in interface Visitor
Parameters:
w - The way to inspect.

visit

public void visit(Relation e)
Description copied from interface: Visitor
Visiting call for relations.

Specified by:
visit in interface Visitor
Parameters:
e - The relation to inspect.

visit

public void visit(Changeset cs)
Description copied from interface: Visitor
Visiting call for changesets.

Specified by:
visit in interface Visitor
Parameters:
cs - The changeset to inspect.

escape

protected java.lang.String escape(java.lang.String s)

appendPrimitive

protected void appendPrimitive(OsmPrimitive p)

appendCoord

protected void appendCoord(LatLon c)


JOSM