Class FunctionArguments
java.lang.Object
org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.FunctionArguments
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double
convertFromDegrees
(double degs, IRI units) Convert degrees to another unitstatic double
convertToDegrees
(double v, IRI units) Convert a value to degreesstatic double
Get the double valuestatic Literal
getLiteral
(Function func, Value v, IRI expectedDatatype) Get the literal of a specific data typestatic org.locationtech.spatial4j.shape.Point
Get the geo pointstatic org.locationtech.spatial4j.shape.Shape
Get the geo shapestatic String
Get the string valuestatic IRI
Get the UoM IRI of the unit
-
Constructor Details
-
FunctionArguments
private FunctionArguments()Empty constructor
-
-
Method Details
-
getDouble
Get the double value- Parameters:
func
- functionv
- value- Returns:
- double
- Throws:
ValueExprEvaluationException
-
getString
Get the string value- Parameters:
func
- functionv
- value- Returns:
- string
- Throws:
ValueExprEvaluationException
-
getShape
public static org.locationtech.spatial4j.shape.Shape getShape(Function func, Value v, org.locationtech.spatial4j.context.SpatialContext context) throws ValueExprEvaluationException Get the geo shape- Parameters:
func
- functionv
- valuecontext
-- Returns:
- shape
- Throws:
ValueExprEvaluationException
-
getPoint
public static org.locationtech.spatial4j.shape.Point getPoint(Function func, Value v, org.locationtech.spatial4j.context.SpatialContext geoContext) throws ValueExprEvaluationException Get the geo point- Parameters:
func
- functionv
- valuegeoContext
-- Returns:
- point
- Throws:
ValueExprEvaluationException
-
getLiteral
public static Literal getLiteral(Function func, Value v, IRI expectedDatatype) throws ValueExprEvaluationException Get the literal of a specific data type- Parameters:
func
- functionv
- valueexpectedDatatype
-- Returns:
- literal
- Throws:
ValueExprEvaluationException
-
getUnits
Get the UoM IRI of the unit- Parameters:
func
- functionv
- value- Returns:
- UoM IRI
- Throws:
ValueExprEvaluationException
-
convertFromDegrees
Convert degrees to another unit- Parameters:
degs
- degreesunits
- UoM IRI of the unit to convert to- Returns:
- converted value as a double
- Throws:
ValueExprEvaluationException
-
convertToDegrees
Convert a value to degrees- Parameters:
v
- valueunits
- UoM IRI of the unit- Returns:
- degrees as a double
- Throws:
ValueExprEvaluationException
-