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 voidsetGID(String gid)Sets thegidattribute to be output on the Geometry element.voidsetLinePrefix(String linePrefix)voidsetMaximumCoordinatesPerLine(int maxCoordinatesPerLine)voidsetSRSName(String srsName)Sets thesrsNameattribute to be output on the Geometry element.Stringwrite(org.locationtech.jts.geom.Geometry geom)voidwrite(org.locationtech.jts.geom.Geometry geometry, Writer writer)voidwrite(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 thesrsNameattribute to be output on the Geometry element. Ifnullno attribute will be output.- Parameters:
srsName-
-
setGID
public void setGID(String gid)
Sets thegidattribute to be output on the Geometry element. Ifnullno 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
-
-