public class SVGWriter extends Object
Geometry
.
The Well-Known Text format is defined in the
OGC
Simple Features Specification for SQL.
See WKTReader
for a formal specification of the format syntax.
The WKTWriter
outputs coordinates rounded to the precision
model. Only the maximum number of decimal places
necessary to represent the ordinates to the required precision will be
output.
The SFS WKT spec does not define a special tag for LinearRing
s.
Under the spec, rings are output as LINESTRING
s.
In order to allow precisely specifying constructed geometries,
JTS also supports a non-standard LINEARRING
tag which is used
to output LinearRings.
WKTReader
Constructor and Description |
---|
SVGWriter()
Creates a new SVGWriter with default settings
|
Modifier and Type | Method and Description |
---|---|
static String |
stringOfChar(char ch,
int count)
Returns a
String of repeated characters. |
String |
write(Geometry geometry)
Converts a
Geometry to its Well-known Text representation. |
void |
write(Geometry geometry,
Writer writer)
Converts a
Geometry to its Well-known Text representation. |
String |
writeFormatted(Geometry geometry)
Same as
write , but with newlines and spaces to make the
well-known text more readable. |
void |
writeFormatted(Geometry geometry,
Writer writer)
Same as
write , but with newlines and spaces to make the
well-known text more readable. |
public static String stringOfChar(char ch, int count)
String
of repeated characters.ch
- the character to repeatcount
- the number of times to repeat the characterString
of characterspublic String write(Geometry geometry)
Geometry
to its Well-known Text representation.geometry
- a Geometry
to processpublic void write(Geometry geometry, Writer writer) throws IOException
Geometry
to its Well-known Text representation.geometry
- a Geometry
to processIOException
public String writeFormatted(Geometry geometry)
write
, but with newlines and spaces to make the
well-known text more readable.geometry
- a Geometry
to processpublic void writeFormatted(Geometry geometry, Writer writer) throws IOException
write
, but with newlines and spaces to make the
well-known text more readable.geometry
- a Geometry
to processIOException
Copyright © 2020. All Rights Reserved.