kiwi-postgis  Version 0.1.0.0
PolyshapeDatatype Class Reference
Inheritance diagram for PolyshapeDatatype:
Collaboration diagram for PolyshapeDatatype:

Public Member Functions

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

Static Public Attributes

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

Static Private Attributes

static final PolyshapeReader reader =new PolyshapeReader()
 
static final JtsPolyshapeWriter writer =new JtsPolyshapeWriter()
 

Member Function Documentation

◆ read()

Geometry read ( String  geometryLiteral)

References PolyshapeReader.read().

42  {
43  try {
44  return reader.read(geometryLiteral);
45  } catch (IOException | ParseException e) {
46  throw new RuntimeException(e.getMessage());
47  }
48  }
static final PolyshapeReader reader
Definition: PolyshapeDatatype.java:23
Geometry read(Object value)
Definition: PolyshapeReader.java:50

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

References PolyshapeWriter.toString().

37  {
38  return writer.toString(geometry);
39  }
static final JtsPolyshapeWriter writer
Definition: PolyshapeDatatype.java:25
String toString(Geometry shape)
Definition: PolyshapeWriter.java:131

Member Data Documentation

◆ INSTANCE

final PolyshapeDatatype INSTANCE = new PolyshapeDatatype()
static

A static instance of WKTDatatype.

Referenced by LiteralRegistry.LiteralRegistry().

◆ reader

final PolyshapeReader reader =new PolyshapeReader()
staticprivate

◆ URI

final String URI = POSTGIS.Polyshape
static

The default WKT type URI.

Referenced by LiteralRegistry.LiteralRegistry().

◆ writer

final JtsPolyshapeWriter writer =new JtsPolyshapeWriter()
staticprivate