OmniSciDB  17c254d2f8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GeoWktSerializer< kPOINT > Struct Template Reference

#include <ResultSetGeoSerialization.h>

Static Public Member Functions

static TargetValue serialize (const SQLTypeInfo &geo_ti, std::array< VarlenDatumPtr, 1 > &vals)
 

Detailed Description

template<>
struct GeoWktSerializer< kPOINT >

Definition at line 161 of file ResultSetGeoSerialization.h.

Member Function Documentation

static TargetValue GeoWktSerializer< kPOINT >::serialize ( const SQLTypeInfo geo_ti,
std::array< VarlenDatumPtr, 1 > &  vals 
)
inlinestatic

Definition at line 162 of file ResultSetGeoSerialization.h.

References anonymous_namespace{ResultSetGeoSerialization.h}::decompress_coords< double >(), SQLTypeInfo::get_notnull(), and Geo_namespace::GeoBase::getWktString().

163  {
164  // TODO: support EMPTY geo and serialize it as GEOMETRYCOLLECTION EMPTY
165  if (!geo_ti.get_notnull() && vals[0]->is_null) {
166  return NullableString("NULL");
167  }
169  *decompress_coords<double>(geo_ti, vals[0]->pointer, vals[0]->length));
170  return NullableString(point.getWktString());
171  }
std::shared_ptr< std::vector< double > > decompress_coords< double >(const SQLTypeInfo &geo_ti, const int8_t *coords, const size_t coords_sz)
boost::variant< std::string, void * > NullableString
Definition: TargetValue.h:155
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:265

+ Here is the call graph for this function:


The documentation for this struct was generated from the following file: