OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GeoTargetValueSerializer< kMULTIPOLYGON > Struct Template Reference

#include <ResultSetGeoSerialization.h>

Static Public Member Functions

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

Detailed Description

template<>
struct GeoTargetValueSerializer< kMULTIPOLYGON >

Definition at line 263 of file ResultSetGeoSerialization.h.

Member Function Documentation

static TargetValue GeoTargetValueSerializer< kMULTIPOLYGON >::serialize ( const SQLTypeInfo geo_ti,
std::array< VarlenDatumPtr, 3 > &  vals 
)
inlinestatic

Definition at line 264 of file ResultSetGeoSerialization.h.

References anonymous_namespace{ResultSetGeoSerialization.h}::decompress_coords< double >(), and anonymous_namespace{ResultSetGeoSerialization.h}::unpack_geo_vector().

265  {
266  // TODO: once NULL geo support is in, resurrect coords NULL check under !notnull
267  // if (!geo_ti.get_notnull() &&
268  // (vals[0]->is_null || vals[1]->is_null || vals[2]->is_null)) {
269  // return GeoTargetValue();
270  // }
271  std::vector<int32_t> ring_sizes_vec;
272  unpack_geo_vector(ring_sizes_vec, vals[1]->pointer, vals[1]->length);
273  std::vector<int32_t> poly_rings_vec;
274  unpack_geo_vector(poly_rings_vec, vals[2]->pointer, vals[2]->length);
276  *decompress_coords<double>(geo_ti, vals[0]->pointer, vals[0]->length),
277  ring_sizes_vec,
278  poly_rings_vec);
279  }
void unpack_geo_vector(std::vector< T > &output, const int8_t *input_ptr, const size_t sz)
std::shared_ptr< std::vector< double > > decompress_coords< double >(const SQLTypeInfo &geo_ti, const int8_t *coords, const size_t coords_sz)

+ Here is the call graph for this function:


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