Class WKTLiteralFactory

java.lang.Object
org.apache.jena.geosparql.implementation.WKTLiteralFactory

public class WKTLiteralFactory extends Object
Convenience methods to produce WKT Literals.
  • Constructor Details

    • WKTLiteralFactory

      public WKTLiteralFactory()
  • Method Details

    • createPoint

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

      public static final Literal createPoint(Double x, Double y, 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(Double xMin, Double yMin, Double xMax, 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(Double xMin, Double yMin, Double xMax, Double yMax, 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(Double xMin, Double yMin, Double xMax, 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(Double xMin, Double yMin, Double xMax, Double yMax, 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 String reducePrecision(Double value)
      Reduce precision if decimal places are zero.
      Parameters:
      value -
      Returns:
      Value with zero decimal places stripped.