rdf4j-postgis  Version 0.1.0.0
RasterAttributeIntIntDoubleFunction Class Referenceabstract
Inheritance diagram for RasterAttributeIntIntDoubleFunction:
Collaboration diagram for RasterAttributeIntIntDoubleFunction:

Public Member Functions

Value evaluate (ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException
 
abstract Double attribute (GridCoverage geom, Integer longitude, Integer latitude)
 

Member Function Documentation

◆ attribute()

abstract Double attribute ( GridCoverage  geom,
Integer  longitude,
Integer  latitude 
)
abstract

◆ evaluate()

Value evaluate ( ValueFactory  valueFactory,
Value...  args 
) throws ValueExprEvaluationException
17  {
18  if (args.length != 3) {
19  throw new ValueExprEvaluationException(getURI() + " requires exactly 1 arguments, got " + args.length);
20  }
21  LiteralType l=LiteralRegistry.getLiteral(((Literal)args[0]).getDatatype().toString());
22  if(l instanceof RasterLiteral) {
23  GridCoverage geom=((RasterLiteral)l).read(args[0].stringValue());
24  Integer longitude = Integer.valueOf(args[1].stringValue());
25  Integer latitude = Integer.valueOf(args[2].stringValue());
26  Double result = attribute(geom,longitude,latitude);
27  return valueFactory.createLiteral(result);
28  }
29  return null;
30  }
abstract Double attribute(GridCoverage geom, Integer longitude, Integer latitude)

References RasterAttributeIntIntDoubleFunction.attribute(), and LiteralRegistry.getLiteral().

Referenced by RasterToWorldCoordXTest.testRasterToWorldCoordX(), RasterToWorldCoordYTest.testRasterToWorldCoordY(), WorldToRasterCoordXTest.testWorldToRasterCoordX(), and WorldToRasterCoordYTest.testWorldToRasterCoordY().