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

Public Member Functions

Value evaluate (ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException
 
abstract Geometry construct (String input)
 

Member Function Documentation

◆ construct()

◆ evaluate()

Value evaluate ( ValueFactory  valueFactory,
Value...  args 
) throws ValueExprEvaluationException
17  {
18  if (args.length != 1) {
19  throw new ValueExprEvaluationException(getURI() + " requires exactly 1 arguments, got " + args.length);
20  }
21  String geomString = args[0].stringValue();
22  Geometry result = construct(geomString);
23  return valueFactory.createLiteral(WKTDatatype.INSTANCE.unparse(result), WKTDatatype.LiteralIRI);
24  }

References GeometricConstructor.construct(), WKTDatatype.INSTANCE, WKTDatatype.LiteralIRI, and WKTDatatype.unparse().

Referenced by GeomFromGeoJSONTest.testGeomFromGeoJSON(), GeomFromTextTest.testGeomFromText(), GeomFromWKBTest.testGeomFromWKB(), MakeLineTest.testMakeLine1(), MakePointTest.testMakePoint1(), MakePointTest.testMakePointXYZ(), PointFromTextTest.testPointFromText(), and PolygonFromTextTest.testPolygonFromText().