Package mil.nga.crs.wkt
Class WKTUtils
- java.lang.Object
-
- mil.nga.crs.wkt.WKTUtils
-
public class WKTUtils extends Object
CRS Well-Known Text Utilities- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description WKTUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CRSType
getCoordinateReferenceSystemType(CRSKeyword keyword)
Get the Coordinate Reference System Typestatic UnitType
getUnitType(CRSKeyword keyword)
Get the unit type from the keywordstatic boolean
isLeftDelimiter(String text)
Is the text a left delimiterstatic boolean
isOrdinalDateTime(CoordinateSystemType type)
Is the Coordinate System Type an ordinal or temporal date time typestatic boolean
isRightDelimiter(String text)
Is the text a right delimiterstatic boolean
isSpatial(CoordinateSystemType type)
Is the Coordinate System Type a spatial typestatic boolean
isTemporalCountMeasure(CoordinateSystemType type)
Is the Coordinate System Type a temporal count or measure typestatic String
pretty(String wkt)
Convert the WKT to a pretty WKT string, 4 space indentsstatic String
pretty(String wkt, String indent)
Convert the WKT to a pretty WKT stringstatic String
pretty(String wkt, String newline, String indent)
Convert the WKT to a pretty WKT stringstatic String
prettyNoIndent(String wkt)
Convert the WKT to a pretty WKT string, no indentsstatic String
prettyTabIndent(String wkt)
Convert the WKT to a pretty WKT string, tab indents
-
-
-
Method Detail
-
isLeftDelimiter
public static boolean isLeftDelimiter(String text)
Is the text a left delimiter- Parameters:
text
- wkt text token- Returns:
- true if left delimiter
-
isRightDelimiter
public static boolean isRightDelimiter(String text)
Is the text a right delimiter- Parameters:
text
- wkt text token- Returns:
- true if right delimiter
-
isSpatial
public static boolean isSpatial(CoordinateSystemType type)
Is the Coordinate System Type a spatial type- Parameters:
type
- coordinate system type- Returns:
- true if a spatial type
-
isTemporalCountMeasure
public static boolean isTemporalCountMeasure(CoordinateSystemType type)
Is the Coordinate System Type a temporal count or measure type- Parameters:
type
- coordinate system type- Returns:
- true if a spatial type
-
isOrdinalDateTime
public static boolean isOrdinalDateTime(CoordinateSystemType type)
Is the Coordinate System Type an ordinal or temporal date time type- Parameters:
type
- coordinate system type- Returns:
- true if a spatial type
-
getUnitType
public static UnitType getUnitType(CRSKeyword keyword)
Get the unit type from the keyword- Parameters:
keyword
- coordinate reference system keyword- Returns:
- unit type
-
getCoordinateReferenceSystemType
public static CRSType getCoordinateReferenceSystemType(CRSKeyword keyword)
Get the Coordinate Reference System Type- Parameters:
keyword
- coordinate reference system keyword- Returns:
- coordinate reference system type
-
pretty
public static String pretty(String wkt) throws IOException
Convert the WKT to a pretty WKT string, 4 space indents- Parameters:
wkt
- well-known text- Returns:
- pretty wkt
- Throws:
IOException
- upon failure to read and create
-
prettyTabIndent
public static String prettyTabIndent(String wkt) throws IOException
Convert the WKT to a pretty WKT string, tab indents- Parameters:
wkt
- well-known text- Returns:
- pretty wkt
- Throws:
IOException
- upon failure to read and create
-
prettyNoIndent
public static String prettyNoIndent(String wkt) throws IOException
Convert the WKT to a pretty WKT string, no indents- Parameters:
wkt
- well-known text- Returns:
- pretty wkt
- Throws:
IOException
- upon failure to read and create
-
pretty
public static String pretty(String wkt, String indent) throws IOException
Convert the WKT to a pretty WKT string- Parameters:
wkt
- well-known textindent
- indent string- Returns:
- pretty wkt
- Throws:
IOException
- upon failure to read and create
-
pretty
public static String pretty(String wkt, String newline, String indent) throws IOException
Convert the WKT to a pretty WKT string- Parameters:
wkt
- well-known textnewline
- newline stringindent
- indent string- Returns:
- pretty wkt
- Throws:
IOException
- upon failure to read and create
-
-