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

Public Member Functions

Value evaluate (ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException
 
abstract Geometry modify (GridCoverage coverage)
 

Member Function Documentation

◆ evaluate()

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

References LiteralRegistry.getLiteral(), and RasterToVectorExportFunction.modify().

◆ modify()

abstract Geometry modify ( GridCoverage  coverage)
abstract