|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vividsolutions.jts.io.WKTWriter
public class WKTWriter
Outputs the Well-Known Text representation of a Geometry.
The Well-known Text format is defined in the
OGC Simple Features Specification for SQL.
The WKTWriter outputs coordinates rounded to the precision
model. No more than the maximum number of necessary decimal places will be
output.
A non-standard LINEARRING tag is used for LinearRings.
The SFS WKT spec does not define a special tag for LinearRings.
Under it, rings are output using LINESTRING.
WKTReader| Constructor Summary | |
|---|---|
WKTWriter()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
stringOfChar(char ch,
int count)
Returns a String of repeated characters. |
static java.lang.String |
toLineString(Coordinate p0,
Coordinate p1)
Generates the WKT for a 2-point LineString. |
static java.lang.String |
toLineString(CoordinateSequence seq)
Generates the WKT for a N-point LineString. |
static java.lang.String |
toPoint(Coordinate p0)
Generates the WKT for a Point. |
java.lang.String |
write(Geometry geometry)
Converts a Geometry to its Well-known Text representation. |
void |
write(Geometry geometry,
java.io.Writer writer)
Converts a Geometry to its Well-known Text representation. |
java.lang.String |
writeFormatted(Geometry geometry)
Same as write, but with newlines and spaces to make the
well-known text more readable. |
void |
writeFormatted(Geometry geometry,
java.io.Writer writer)
Same as write, but with newlines and spaces to make the
well-known text more readable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WKTWriter()
| Method Detail |
|---|
public static java.lang.String toPoint(Coordinate p0)
Point.
p0 - the point coordinate
public static java.lang.String toLineString(CoordinateSequence seq)
LineString.
seq - the sequence to outpout
public static java.lang.String toLineString(Coordinate p0,
Coordinate p1)
LineString.
p0 - the first coordinatep1 - the second coordinate
public static java.lang.String stringOfChar(char ch,
int count)
String of repeated characters.
ch - the character to repeatcount - the number of times to repeat the character
String of characterspublic java.lang.String write(Geometry geometry)
Geometry to its Well-known Text representation.
geometry - a Geometry to process
public void write(Geometry geometry,
java.io.Writer writer)
throws java.io.IOException
Geometry to its Well-known Text representation.
geometry - a Geometry to process
java.io.IOExceptionpublic java.lang.String writeFormatted(Geometry geometry)
write, but with newlines and spaces to make the
well-known text more readable.
geometry - a Geometry to process
public void writeFormatted(Geometry geometry,
java.io.Writer writer)
throws java.io.IOException
write, but with newlines and spaces to make the
well-known text more readable.
geometry - a Geometry to process
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||