Package org.locationtech.jtstest.util.io
Class SVGWriter
- java.lang.Object
-
- org.locationtech.jtstest.util.io.SVGWriter
-
-
Constructor Summary
Constructors Constructor Description SVGWriter()
Creates a new SVGWriter with default settings
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
stringOfChar(char ch, int count)
Returns aString
of repeated characters.String
write(Geometry geometry)
Converts aGeometry
to its Well-known Text representation.void
write(Geometry geometry, Writer writer)
Converts aGeometry
to its Well-known Text representation.String
writeFormatted(Geometry geometry)
Same aswrite
, but with newlines and spaces to make the well-known text more readable.void
writeFormatted(Geometry geometry, Writer writer)
Same aswrite
, but with newlines and spaces to make the well-known text more readable.
-
-
-
Method Detail
-
stringOfChar
public static String stringOfChar(char ch, int count)
Returns aString
of repeated characters.- Parameters:
ch
- the character to repeatcount
- the number of times to repeat the character- Returns:
- a
String
of characters
-
write
public String write(Geometry geometry)
Converts aGeometry
to its Well-known Text representation.- Parameters:
geometry
- aGeometry
to process- Returns:
- a
string (see the OpenGIS Simple Features Specification)
-
write
public void write(Geometry geometry, Writer writer) throws IOException
Converts aGeometry
to its Well-known Text representation.- Parameters:
geometry
- aGeometry
to process- Throws:
IOException
-
writeFormatted
public String writeFormatted(Geometry geometry)
Same aswrite
, but with newlines and spaces to make the well-known text more readable.- Parameters:
geometry
- aGeometry
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 aswrite
, but with newlines and spaces to make the well-known text more readable.- Parameters:
geometry
- aGeometry
to process- Throws:
IOException
-
-