public class Wkt extends Object
Note that the WktDecoder instances returned by the factory
methods are not thread-safe.
| Modifier and Type | Class and Description |
|---|---|
static class |
Wkt.Dialect |
| Constructor and Description |
|---|
Wkt() |
| Modifier and Type | Method and Description |
|---|---|
static Geometry<?> |
fromWkt(String wkt) |
static <P extends Position> |
fromWkt(String wkt,
CoordinateReferenceSystem<P> crs)
Decodes the specified WKT String to a
Geometry. |
static <P extends Position> |
fromWkt(String wkt,
CoordinateReferenceSystem<P> crs,
Wkt.Dialect dialect)
Decodes the specified WKT String to a
Geometry. |
static Geometry<?> |
fromWkt(String wkt,
Wkt.Dialect dialect) |
static WktDecoder |
newDecoder()
Creates a
WktDecoder for the default dialect (Postgis 1.x EWKT). |
static WktDecoder |
newDecoder(Wkt.Dialect dialect)
Creates a
WktDecoder for the specified WKT Dialect. |
static WktEncoder |
newEncoder()
Creates a
WktEncoder for the default dialect (Postgis 1.x EWKT). |
static WktEncoder |
newEncoder(Wkt.Dialect dialect)
Creates a
WktEncoder for the specified WKT Dialect. |
static String |
toWkt(Geometry<?> geometry)
Encodes a
Geometry to a WKT representation. |
static String |
toWkt(Geometry<?> geometry,
Wkt.Dialect dialect)
Encodes a
Geometry to a WKT representation according to
a specific dialect. |
public static <P extends Position> Geometry<P> fromWkt(String wkt, CoordinateReferenceSystem<P> crs)
Geometry.
This method uses the default WKT dialect (Postgis v1.5 EWKT)
wkt - the WKT string to decodecrs - the Coordinate Reference System for the resultpublic static <P extends Position> Geometry<P> fromWkt(String wkt, CoordinateReferenceSystem<P> crs, Wkt.Dialect dialect)
Geometry.
This method uses the default WKT dialect (Postgis v1.5 EWKT)
wkt - the WKT string to decode*crs - the Coordinate Reference System for the resultdialect - thw WKT Dialect of the WKT Stringpublic static Geometry<?> fromWkt(String wkt, Wkt.Dialect dialect)
public static String toWkt(Geometry<?> geometry)
Geometry to a WKT representation.
This method uses the default WKT dialect (Postgis v1.5 EWKT)
geometry - the Geometry to encodepublic static String toWkt(Geometry<?> geometry, Wkt.Dialect dialect)
Geometry to a WKT representation according to
a specific dialect.
This method uses the default WKT dialect (Postgis v1.5 EWKT)
geometry - the Geometry to encodepublic static WktDecoder newDecoder(Wkt.Dialect dialect)
WktDecoder for the specified WKT Dialect.dialect - the WKT dialectWktDecoder that supports the specified dialectpublic static WktDecoder newDecoder()
WktDecoder for the default dialect (Postgis 1.x EWKT).WktDecoderpublic static WktEncoder newEncoder(Wkt.Dialect dialect)
WktEncoder for the specified WKT Dialect.dialect - the WKT dialectWktEncoder that supports the specified dialectpublic static WktEncoder newEncoder()
WktEncoder for the default dialect (Postgis 1.x EWKT).WktEncoder that supports the default dialectCopyright © 2023 geolatte.org. All rights reserved.