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

Public Member Functions

Value evaluate (ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException
 
abstract Integer attribute (GridCoverage geom, Integer noband, Integer x, Integer y)
 

Member Function Documentation

◆ attribute()

abstract Integer attribute ( GridCoverage  geom,
Integer  noband,
Integer  x,
Integer  y 
)
abstract

◆ evaluate()

Value evaluate ( ValueFactory  valueFactory,
Value...  args 
) throws ValueExprEvaluationException
17  {
18  if (args.length != 3) {
19  throw new ValueExprEvaluationException(getURI() + " requires exactly 4 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 noband = Integer.valueOf(args[1].stringValue());
25  Integer x = Integer.valueOf(args[2].stringValue());
26  Integer y = Integer.valueOf(args[2].stringValue());
27  Integer result = attribute(geom,noband,x,y);
28  return valueFactory.createLiteral(result);
29  }
30  return null;
31  }
abstract Integer attribute(GridCoverage geom, Integer noband, Integer x, Integer y)

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