rdf4j-postgis  Version 0.1.0.0
MinTileX Class Reference
Inheritance diagram for MinTileX:
Collaboration diagram for MinTileX:

Public Member Functions

String getURI ()
 
Integer attribute (GridCoverage raster)
 
Value evaluate (ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException
 

Member Function Documentation

◆ attribute()

Integer attribute ( GridCoverage  raster)

Reimplemented from RasterAttributeIntFunction.

16  {
17  return raster.render(raster.getGridGeometry().getExtent()).getMinTileX();
18  }

◆ evaluate()

Value evaluate ( ValueFactory  valueFactory,
Value...  args 
) throws ValueExprEvaluationException
inherited
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().

◆ getURI()

String getURI ( )
11  {
12  return POSTGIS.st_minTileX.stringValue();
13  }

References POSTGIS.st_minTileX.