kiwi-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)
47  {
48  InputStream stream = new ByteArrayInputStream(geometryLiteral.getBytes(StandardCharsets.UTF_8));
49  /*GeobufDecoder decoder;
50  try {
51  decoder = new GeobufDecoder(stream);
52  Geometry geom=decoder.next().geometry;
53  return LiteralUtils.createGeometry(geom.getCoordinates(), geom.getGeometryType(), geom.getSRID());
54  } catch (IOException e) {
55  // TODO Auto-generated catch block
56  e.printStackTrace();
57  throw new RuntimeException();
58  }*/
59  return null;
60  }

◆ toString()

String toString ( )
64  {
65  return "GeoBufDatatype{" + URI + '}';
66  }
static final String URI
The default WKT type URI.
Definition: GeobufDatatype.java:21

◆ 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.

Referenced by AsGeobuf.operation().

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

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().