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 Details

    • GMLGeometryWriter

      public GMLGeometryWriter()
  • Method Details

    • setSRSName

      public void setSRSName(String srsName)
      Sets the srsName attribute to be output on the Geometry element. If null no 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 IOException
      Generates the GML representation of a JTS Geometry.
      Parameters:
      g - Geometry to output
      Throws:
      IOException