27 #include "../core/translator/Translator.h" 28 #include "../datatype/ByteArray.h" 29 #include "../datatype/Enums.h" 30 #include "../datatype/SimpleData.h" 43 char* wkb =
static_cast<const Geometry*
>(
d)->asBinary(size);
59 throw Exception(
TE_TR(
"The input data type is not a byte array!"));
61 return WKBReader::read(static_cast<const te::dt::ByteArray*>(d)->getData());
69 return WKTReader::read(static_cast<const te::dt::String*>(d)->getValue().c_str());
A set of function that convert a Geometry type to other types and vice-versa.
SimpleData< std::string, STRING_TYPE > String
Base exception class for plugin module.
te::dt::AbstractData * GeometryToByteArrayConverter(te::dt::AbstractData *d)
It converts a Geometry data value to a ByteArray data value.
#define TE_TR(message)
It marks a string in order to get translated.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
te::dt::AbstractData * GeometryToStringConverter(te::dt::AbstractData *d)
It converts a Geometry data value to a String data value.
te::dt::AbstractData * ByteArrayToGeometryConverter(te::dt::AbstractData *d)
It converts a ByteArray data value to a Geometry data value.
static te::dt::DateTime d(2010, 8, 9, 15, 58, 39)
A base class for values that can be retrieved from the data access module.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
virtual int getTypeCode() const =0
It returns the data type code associated to the data value.
A class that deserializes a geometry from a valid WKB.
int getTypeCode() const
It returns the data type code associated to date and time values: DATETIME_TYPE.
te::dt::AbstractData * StringToGeometryConverter(te::dt::AbstractData *d)
It converts a String data value to a Geometry data value.
An exception class for the Geometry module.
A class that deserializes a geometry from a valid WKT.
A class for representing binary data.