Package org.locationtech.jts.jump.io
Class GMLGeometryWriter
- java.lang.Object
-
- org.locationtech.jts.jump.io.GMLGeometryWriter
-
public class GMLGeometryWriter extends 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
Constructors Constructor Description GMLGeometryWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setGID(String gid)
Sets thegid
attribute to be output on the Geometry element.void
setLinePrefix(String linePrefix)
void
setMaximumCoordinatesPerLine(int maxCoordinatesPerLine)
void
setSRSName(String srsName)
Sets thesrsName
attribute to be output on the Geometry element.String
write(org.locationtech.jts.geom.Geometry geom)
void
write(org.locationtech.jts.geom.Geometry geometry, Writer writer)
void
write(org.locationtech.jts.geom.Geometry g, StringBuffer buf)
Generates the GML representation of a JTS Geometry.
-
-
-
Method Detail
-
setLinePrefix
public void setLinePrefix(String linePrefix)
-
setSRSName
public void setSRSName(String srsName)
Sets thesrsName
attribute to be output on the Geometry element. Ifnull
no attribute will be output.- Parameters:
srsName
-
-
setGID
public void setGID(String gid)
Sets thegid
attribute to be output on the Geometry element. Ifnull
no attribute will be output.- Parameters:
srsName
-
-
setMaximumCoordinatesPerLine
public void setMaximumCoordinatesPerLine(int maxCoordinatesPerLine)
-
write
public String write(org.locationtech.jts.geom.Geometry geom)
-
write
public void write(org.locationtech.jts.geom.Geometry geometry, Writer writer) throws IOException
- Throws:
IOException
-
write
public void write(org.locationtech.jts.geom.Geometry g, StringBuffer buf)
Generates the GML representation of a JTS Geometry.- Parameters:
g
- Geometry to output
-
-