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

Public Member Functions

String unparse (Geometry geometry)
 This method Un-parses the JTS Geometry to the WKT literal. More...
 
Geometry read (String geometryLiteral)
 
String toString ()
 

Static Public Attributes

static final String URI = POSTGIS.GeoBuf
 The default WKT type URI. More...
 
static final GeobufDatatype INSTANCE = new GeobufDatatype()
 A static instance of WKTDatatype. More...
 

Member Function Documentation

◆ read()

Geometry read ( String  geometryLiteral)

Reimplemented from VectorLiteral.

44  {
45  InputStream stream = new ByteArrayInputStream(geometryLiteral.getBytes(StandardCharsets.UTF_8));
46  /*GeobufDecoder decoder;
47  try {
48  decoder = new GeobufDecoder(stream);
49  Geometry geom=decoder.next().geometry;
50  return LiteralUtils.createGeometry(geom.getCoordinates(), geom.getGeometryType(), geom.getSRID());
51  } catch (IOException e) {
52  // TODO Auto-generated catch block
53  e.printStackTrace();
54  throw new RuntimeException();
55  }*/
56  return null;
57  }

◆ toString()

String toString ( )
61  {
62  return "GeoBufDatatype{" + URI + '}';
63  }
static final String URI
The default WKT type URI.
Definition: GeobufDatatype.java:18

References GeobufDatatype.URI.

◆ unparse()

String unparse ( Geometry  geometry)

This method Un-parses the JTS Geometry to the WKT literal.

Parameters
geometry- the JTS Geometry to be un-parsed
Returns
WKT - the returned WKT Literal.
Notice that the Spatial Reference System is not specified in returned WKT literal.

Reimplemented from VectorLiteral.

36  {
37  /*ByteArrayOutputStream output=new ByteArrayOutputStream();
38  GeobufEncoder enc=new GeobufEncoder(output,geometry.getPrecisionModel().getMaximumSignificantDigits());
39  return enc.geomToGeobuf(geometry).toString();*/
40  return "";
41  }

Referenced by AsGeobuf.operation().

Member Data Documentation

◆ INSTANCE

final GeobufDatatype INSTANCE = new GeobufDatatype()
static

A static instance of WKTDatatype.

Referenced by LiteralRegistry.LiteralRegistry(), and AsGeobuf.operation().

◆ URI

final String URI = POSTGIS.GeoBuf
static

The default WKT type URI.

Referenced by LiteralRegistry.LiteralRegistry(), and GeobufDatatype.toString().