Class WKTLiteralFactory
java.lang.Object
org.apache.jena.geosparql.implementation.WKTLiteralFactory
Convenience methods to produce WKT Literals.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final Literal
WKT Polygon box from two points.static final Literal
WKT Polygon box from two points with no check for value range or order.static final Literal
createLineString
(Double xMin, Double yMin, Double xMax, Double yMax) WKT LineString between two points.static final Literal
WKT LineString between two points with no check for value range or order.static final Literal
createPoint
(Double x, Double y) WKT point.static final Literal
createPoint
(Double x, Double y, String srsURI) WKT point with no check for value range or order.static final String
reducePrecision
(Double value) Reduce precision if decimal places are zero.
-
Constructor Details
-
WKTLiteralFactory
public WKTLiteralFactory()
-
-
Method Details
-
createPoint
WKT point.- Parameters:
x
-y
-- Returns:
- WKT Point in default WKT CRS84.
-
createPoint
WKT point with no check for value range or order.- Parameters:
x
-y
-srsURI
-- Returns:
- WKT Point with SRS URI.
-
createLineString
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
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
Reduce precision if decimal places are zero.- Parameters:
value
-- Returns:
- Value with zero decimal places stripped.
-