public class WktConversionUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Pattern |
EWKT_PATTERN
The EWKT
Pattern instance. |
static String |
EWKT_REGEX
The PostGIS EWKT regular expression.
|
static String |
SRID_REGEX
The SRID regular expression.
|
static String |
WKT_REGEX
The WKT regular expression.
|
Modifier and Type | Method and Description |
---|---|
static String |
convertToFunction(String wkt,
String srid,
Database database,
WktInsertOrUpdateGenerator generator)
Converts the given Well-Known Text and SRID to the appropriate function call for the database.
|
static Object |
handleColumnValue(Object oldValue,
Database database,
WktInsertOrUpdateGenerator generator)
If the old value is a geometry or a Well-Known Text, convert it to the appropriate new value.
|
public static final String SRID_REGEX
public static final String WKT_REGEX
public static final String EWKT_REGEX
public static final Pattern EWKT_PATTERN
Pattern
instance.public static Object handleColumnValue(Object oldValue, Database database, WktInsertOrUpdateGenerator generator)
oldValue
- the old value.database
- the database instance.public static String convertToFunction(String wkt, String srid, Database database, WktInsertOrUpdateGenerator generator)
wkt
- the Well-Known Text string.srid
- the SRID string which may be an empty string.database
- the database instance.Copyright © 2014–2015. All rights reserved.