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

Public Member Functions

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

Member Function Documentation

◆ attribute()

abstract Integer attribute ( GridCoverage  geom)
abstract

◆ evaluate()

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

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

Referenced by MinTileXTest.testMinTileX(), NumBandsTest.testNumBands(), NumYTilesTest.testNumYTiles(), and TileGridYOffsetTest.testTileGridYOffset().