Class SVGWriter


  • public class SVGWriter
    extends Object
    Writes the SVG representation of a Geometry.
    Version:
    1.7
    See Also:
    WKTReader
    • Constructor Detail

      • SVGWriter

        public SVGWriter()
        Creates a new SVGWriter with default settings
    • Method Detail

      • stringOfChar

        public static String stringOfChar​(char ch,
                                          int count)
        Returns a String of repeated characters.
        Parameters:
        ch - the character to repeat
        count - the number of times to repeat the character
        Returns:
        a String of characters
      • write

        public String write​(Geometry geometry)
        Converts a Geometry to its Well-known Text representation.
        Parameters:
        geometry - a Geometry to process
        Returns:
        a string (see the OpenGIS Simple Features Specification)
      • write

        public void write​(Geometry geometry,
                          Writer writer)
                   throws IOException
        Converts a Geometry to its Well-known Text representation.
        Parameters:
        geometry - a Geometry to process
        Throws:
        IOException
      • writeFormatted

        public String writeFormatted​(Geometry geometry)
        Same as write, but with newlines and spaces to make the well-known text more readable.
        Parameters:
        geometry - a Geometry to process
        Returns:
        a string (see the OpenGIS Simple Features Specification), with newlines and spaces
      • writeFormatted

        public void writeFormatted​(Geometry geometry,
                                   Writer writer)
                            throws IOException
        Same as write, but with newlines and spaces to make the well-known text more readable.
        Parameters:
        geometry - a Geometry to process
        Throws:
        IOException