Class WKTLiteralFactory


  • public class WKTLiteralFactory
    extends java.lang.Object
    Convenience methods to produce WKT Literals.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Literal createBox​(java.lang.Double xMin, java.lang.Double yMin, java.lang.Double xMax, java.lang.Double yMax)
      WKT Polygon box from two points.
      static Literal createBox​(java.lang.Double xMin, java.lang.Double yMin, java.lang.Double xMax, java.lang.Double yMax, java.lang.String srsURI)
      WKT Polygon box from two points with no check for value range or order.
      static Literal createLineString​(java.lang.Double xMin, java.lang.Double yMin, java.lang.Double xMax, java.lang.Double yMax)
      WKT LineString between two points.
      static Literal createLineString​(java.lang.Double xMin, java.lang.Double yMin, java.lang.Double xMax, java.lang.Double yMax, java.lang.String srsURI)
      WKT LineString between two points with no check for value range or order.
      static Literal createPoint​(java.lang.Double x, java.lang.Double y)
      WKT point.
      static Literal createPoint​(java.lang.Double x, java.lang.Double y, java.lang.String srsURI)
      WKT point with no check for value range or order.
      static java.lang.String reducePrecision​(java.lang.Double value)
      Reduce precision if decimal places are zero.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WKTLiteralFactory

        public WKTLiteralFactory()
    • Method Detail

      • createPoint

        public static final Literal createPoint​(java.lang.Double x,
                                                java.lang.Double y)
        WKT point.
        Parameters:
        x -
        y -
        Returns:
        WKT Point in default WKT CRS84.
      • createPoint

        public static final Literal createPoint​(java.lang.Double x,
                                                java.lang.Double y,
                                                java.lang.String srsURI)
        WKT point with no check for value range or order.
        Parameters:
        x -
        y -
        srsURI -
        Returns:
        WKT Point with SRS URI.
      • createLineString

        public static final Literal createLineString​(java.lang.Double xMin,
                                                     java.lang.Double yMin,
                                                     java.lang.Double xMax,
                                                     java.lang.Double yMax)
        WKT LineString between two points.
        Parameters:
        xMin -
        yMin -
        xMax -
        yMax -
        Returns:
        WKT LineString in default WKT CRS84.
      • createLineString

        public static final Literal createLineString​(java.lang.Double xMin,
                                                     java.lang.Double yMin,
                                                     java.lang.Double xMax,
                                                     java.lang.Double yMax,
                                                     java.lang.String srsURI)
        WKT LineString between two points with no check for value range or order.
        Parameters:
        xMin -
        yMin -
        xMax -
        yMax -
        Returns:
        WKT LineString with SRS URI.
      • createBox

        public static final Literal createBox​(java.lang.Double xMin,
                                              java.lang.Double yMin,
                                              java.lang.Double xMax,
                                              java.lang.Double yMax)
        WKT Polygon box from two points.
        Parameters:
        xMin -
        yMin -
        xMax -
        yMax -
        Returns:
        WKT LineString in default WKT CRS84.
      • createBox

        public static final Literal createBox​(java.lang.Double xMin,
                                              java.lang.Double yMin,
                                              java.lang.Double xMax,
                                              java.lang.Double yMax,
                                              java.lang.String srsURI)
        WKT Polygon box from two points with no check for value range or order.
        Parameters:
        xMin -
        yMin -
        xMax -
        yMax -
        Returns:
        WKT LineString with SRS URI.
      • reducePrecision

        public static final java.lang.String reducePrecision​(java.lang.Double value)
        Reduce precision if decimal places are zero.
        Parameters:
        value -
        Returns:
        Value with zero decimal places stripped.