Class WKTUtils


  • public class WKTUtils
    extends Object
    CRS Well-Known Text Utilities
    Author:
    osbornb
    • Constructor Detail

      • WKTUtils

        public WKTUtils()
    • 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 text
        indent - 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 text
        newline - newline string
        indent - indent string
        Returns:
        pretty wkt
        Throws:
        IOException - upon failure to read and create