Package com.vividsolutions.jump.io
Class GMLGeometryWriter
- java.lang.Object
-
- com.vividsolutions.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 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 g, Writer writer)Generates the GML representation of a JTS Geometry.
-
-
-
Method Detail
-
setSRSName
public void setSRSName(String srsName)
Sets thesrsNameattribute to be output on the Geometry element. Ifnullno attribute will be output.- Parameters:
srsName- name of the SpatialReferenceSystem
-
write
public String write(org.locationtech.jts.geom.Geometry geom)
-
write
public void write(org.locationtech.jts.geom.Geometry g, Writer writer) throws IOExceptionGenerates the GML representation of a JTS Geometry.- Parameters:
g- Geometry to output- Throws:
IOException
-
-