Class GeometryWriter


  • public class GeometryWriter
    extends Object
    Well Known Text writer
    Author:
    osbornb
    • Constructor Detail

      • GeometryWriter

        public GeometryWriter()
        Constructor
        Since:
        1.0.1
      • GeometryWriter

        public GeometryWriter​(Writer writer)
        Constructor
        Parameters:
        writer - writer
        Since:
        1.0.1
    • Method Detail

      • writeGeometry

        public static String writeGeometry​(Geometry geometry)
                                    throws IOException
        Write a geometry to a well-known text string
        Parameters:
        geometry - geometry
        Returns:
        well-known text string
        Throws:
        IOException - upon failure to write
      • getWriter

        public Writer getWriter()
        Get the writer
        Returns:
        writer
        Since:
        1.0.1
      • close

        public void close()
                   throws IOException
        Close the string writer
        Throws:
        IOException - upon failure to close
        Since:
        1.0.1
      • write

        public void write​(Geometry geometry)
                   throws IOException
        Write a geometry to well-known text
        Parameters:
        geometry - geometry
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • getName

        public static String getName​(Geometry geometry)
        Get the well-known text writable geometry name
        Parameters:
        geometry - geometry
        Returns:
        geometry name
      • writePointText

        public void writePointText​(Point point)
                            throws IOException
        Write a Point
        Parameters:
        point - point
        Throws:
        IOException - upon failure to read
        Since:
        1.0.1
      • writePoint

        public void writePoint​(Point point)
                        throws IOException
        Write a Point
        Parameters:
        point - point
        Throws:
        IOException - upon failure to read
        Since:
        1.0.1
      • writeXY

        public void writeXY​(Point point)
                     throws IOException
        Write a Point X and Y value
        Parameters:
        point - point
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • writeZ

        public void writeZ​(Point point)
                    throws IOException
        Write a Point Z value
        Parameters:
        point - point
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • writeM

        public void writeM​(Point point)
                    throws IOException
        Write a Point M value
        Parameters:
        point - point
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • writeLineString

        public void writeLineString​(LineString lineString)
                             throws IOException
        Read a Line String
        Parameters:
        lineString - line string
        Throws:
        IOException - upon failure to read
        Since:
        1.0.1
      • writePolygon

        public void writePolygon​(Polygon polygon)
                          throws IOException
        Write a Polygon
        Parameters:
        polygon - Polygon
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • writeMultiPoint

        public void writeMultiPoint​(MultiPoint multiPoint)
                             throws IOException
        Write a Multi Point
        Parameters:
        multiPoint - multi point
        Throws:
        IOException - upon failure to read
        Since:
        1.0.1
      • writeMultiLineString

        public void writeMultiLineString​(MultiLineString multiLineString)
                                  throws IOException
        Write a Multi Line String
        Parameters:
        multiLineString - Multi Line String
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • writeMultiPolygon

        public void writeMultiPolygon​(MultiPolygon multiPolygon)
                               throws IOException
        Write a Multi Polygon
        Parameters:
        multiPolygon - Multi Polygon
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • writeGeometryCollection

        public void writeGeometryCollection​(GeometryCollection<?> geometryCollection)
                                     throws IOException
        Write a Geometry Collection
        Parameters:
        geometryCollection - Geometry Collection
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • writeCircularString

        public void writeCircularString​(CircularString circularString)
                                 throws IOException
        Write a Circular String
        Parameters:
        circularString - Circular String
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • writeCompoundCurve

        public void writeCompoundCurve​(CompoundCurve compoundCurve)
                                throws IOException
        Write a Compound Curve
        Parameters:
        compoundCurve - Compound Curve
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • writeCurvePolygon

        public void writeCurvePolygon​(CurvePolygon<?> curvePolygon)
                               throws IOException
        Write a Curve Polygon
        Parameters:
        curvePolygon - Curve Polygon
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • writePolyhedralSurface

        public void writePolyhedralSurface​(PolyhedralSurface polyhedralSurface)
                                    throws IOException
        Write a Polyhedral Surface
        Parameters:
        polyhedralSurface - Polyhedral Surface
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • writeTIN

        public void writeTIN​(TIN tin)
                      throws IOException
        Write a TIN
        Parameters:
        tin - TIN
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • writeTriangle

        public void writeTriangle​(Triangle triangle)
                           throws IOException
        Write a Triangle
        Parameters:
        triangle - Triangle
        Throws:
        IOException - upon failure to write
        Since:
        1.0.1
      • writeGeometry

        public static void writeGeometry​(Writer writer,
                                         Geometry geometry)
                                  throws IOException
        Write a geometry to well-known text
        Parameters:
        writer - writer
        geometry - geometry
        Throws:
        IOException - upon failure to write
      • writePointText

        public static void writePointText​(Writer writer,
                                          Point point)
                                   throws IOException
        Write a Point
        Parameters:
        writer - writer
        point - point
        Throws:
        IOException - upon failure to read
      • writePoint

        public static void writePoint​(Writer writer,
                                      Point point)
                               throws IOException
        Write a Point
        Parameters:
        writer - writer
        point - point
        Throws:
        IOException - upon failure to read
      • writeLineString

        public static void writeLineString​(Writer writer,
                                           LineString lineString)
                                    throws IOException
        Read a Line String
        Parameters:
        writer - writer
        lineString - line string
        Throws:
        IOException - upon failure to read
      • writePolygon

        public static void writePolygon​(Writer writer,
                                        Polygon polygon)
                                 throws IOException
        Write a Polygon
        Parameters:
        writer - writer
        polygon - Polygon
        Throws:
        IOException - upon failure to write
      • writeMultiPoint

        public static void writeMultiPoint​(Writer writer,
                                           MultiPoint multiPoint)
                                    throws IOException
        Write a Multi Point
        Parameters:
        writer - writer
        multiPoint - multi point
        Throws:
        IOException - upon failure to read
      • writeMultiLineString

        public static void writeMultiLineString​(Writer writer,
                                                MultiLineString multiLineString)
                                         throws IOException
        Write a Multi Line String
        Parameters:
        writer - writer
        multiLineString - Multi Line String
        Throws:
        IOException - upon failure to write
      • writeMultiPolygon

        public static void writeMultiPolygon​(Writer writer,
                                             MultiPolygon multiPolygon)
                                      throws IOException
        Write a Multi Polygon
        Parameters:
        writer - writer
        multiPolygon - Multi Polygon
        Throws:
        IOException - upon failure to write
      • writeGeometryCollection

        public static void writeGeometryCollection​(Writer writer,
                                                   GeometryCollection<?> geometryCollection)
                                            throws IOException
        Write a Geometry Collection
        Parameters:
        writer - writer
        geometryCollection - Geometry Collection
        Throws:
        IOException - upon failure to write
      • writeCircularString

        public static void writeCircularString​(Writer writer,
                                               CircularString circularString)
                                        throws IOException
        Write a Circular String
        Parameters:
        writer - writer
        circularString - Circular String
        Throws:
        IOException - upon failure to write
      • writeCompoundCurve

        public static void writeCompoundCurve​(Writer writer,
                                              CompoundCurve compoundCurve)
                                       throws IOException
        Write a Compound Curve
        Parameters:
        writer - writer
        compoundCurve - Compound Curve
        Throws:
        IOException - upon failure to write
      • writeCurvePolygon

        public static void writeCurvePolygon​(Writer writer,
                                             CurvePolygon<?> curvePolygon)
                                      throws IOException
        Write a Curve Polygon
        Parameters:
        writer - writer
        curvePolygon - Curve Polygon
        Throws:
        IOException - upon failure to write
      • writePolyhedralSurface

        public static void writePolyhedralSurface​(Writer writer,
                                                  PolyhedralSurface polyhedralSurface)
                                           throws IOException
        Write a Polyhedral Surface
        Parameters:
        writer - writer
        polyhedralSurface - Polyhedral Surface
        Throws:
        IOException - upon failure to write
      • writeTIN

        public static void writeTIN​(Writer writer,
                                    TIN tin)
                             throws IOException
        Write a TIN
        Parameters:
        writer - writer
        tin - TIN
        Throws:
        IOException - upon failure to write
      • writeTriangle

        public static void writeTriangle​(Writer writer,
                                         Triangle triangle)
                                  throws IOException
        Write a Triangle
        Parameters:
        writer - writer
        triangle - Triangle
        Throws:
        IOException - upon failure to write