com.vividsolutions.jump.io
Class GMLGeometryWriter

java.lang.Object
  extended by com.vividsolutions.jump.io.GMLGeometryWriter

public class GMLGeometryWriter
extends java.lang.Object

Writes or creates a formatted string containing the GML representation of a JTS Geometry. Supports a user-defined line prefix and a user-defined maximum number of coordinates per line. Indents components of Geometries to provide a nicely-formatted representation.


Constructor Summary
GMLGeometryWriter()
           
 
Method Summary
 void setGID(java.lang.String gid)
          Sets the gid attribute to be output on the Geometry element.
 void setLinePrefix(java.lang.String linePrefix)
           
 void setMaximumCoordinatesPerLine(int maxCoordinatesPerLine)
           
 void setSRSName(java.lang.String srsName)
          Sets the srsName attribute to be output on the Geometry element.
 java.lang.String write(com.vividsolutions.jts.geom.Geometry geom)
           
 void write(com.vividsolutions.jts.geom.Geometry g, java.lang.StringBuffer buf)
          Generates the GML representation of a JTS Geometry.
 void write(com.vividsolutions.jts.geom.Geometry geometry, java.io.Writer writer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GMLGeometryWriter

public GMLGeometryWriter()
Method Detail

setLinePrefix

public void setLinePrefix(java.lang.String linePrefix)

setSRSName

public void setSRSName(java.lang.String srsName)
Sets the srsName attribute to be output on the Geometry element. If null no attribute will be output.

Parameters:
srsName -

setGID

public void setGID(java.lang.String gid)
Sets the gid attribute to be output on the Geometry element. If null no attribute will be output.

Parameters:
srsName -

setMaximumCoordinatesPerLine

public void setMaximumCoordinatesPerLine(int maxCoordinatesPerLine)

write

public java.lang.String write(com.vividsolutions.jts.geom.Geometry geom)

write

public void write(com.vividsolutions.jts.geom.Geometry geometry,
                  java.io.Writer writer)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(com.vividsolutions.jts.geom.Geometry g,
                  java.lang.StringBuffer buf)
Generates the GML representation of a JTS Geometry.

Parameters:
g - Geometry to output