OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeoTargetValueSerializer< kMULTILINESTRING > Struct Template Reference

#include <ResultSetGeoSerialization.h>

Static Public Member Functions

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

Detailed Description

template<>
struct GeoTargetValueSerializer< kMULTILINESTRING >

Definition at line 201 of file ResultSetGeoSerialization.h.

Member Function Documentation

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

Definition at line 202 of file ResultSetGeoSerialization.h.

References Geospatial::decompress_coords< double, SQLTypeInfo >(), SQLTypeInfo::get_notnull(), and Geospatial::unpack_geo_vector().

203  {
204  if (!geo_ti.get_notnull() && (vals[0]->is_null || vals[1]->is_null)) {
205  return GeoTargetValue(boost::optional<GeoMultiLineStringTargetValue>{});
206  }
207  std::vector<int32_t> linestring_sizes_vec;
208  unpack_geo_vector(linestring_sizes_vec, vals[1]->pointer, vals[1]->length);
209  auto gtv =
211  geo_ti, vals[0]->pointer, vals[0]->length),
212  linestring_sizes_vec);
213  return GeoTargetValue(gtv);
214  }
std::shared_ptr< std::vector< double > > decompress_coords< double, SQLTypeInfo >(const SQLTypeInfo &geo_ti, const int8_t *coords, const size_t coords_sz)
boost::optional< boost::variant< GeoPointTargetValue, GeoMultiPointTargetValue, GeoLineStringTargetValue, GeoMultiLineStringTargetValue, GeoPolyTargetValue, GeoMultiPolyTargetValue >> GeoTargetValue
Definition: TargetValue.h:187
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:398
void unpack_geo_vector(std::vector< T > &output, const int8_t *input_ptr, const size_t sz)

+ Here is the call graph for this function:


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