OmniSciDB  dfae7c3b14
GeoTargetValueSerializer< kLINESTRING > 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 GeoTargetValueSerializer< kLINESTRING >

Definition at line 120 of file ResultSetGeoSerialization.h.

Member Function Documentation

◆ serialize()

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

Definition at line 121 of file ResultSetGeoSerialization.h.

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

122  {
123  if (!geo_ti.get_notnull() && vals[0]->is_null) {
124  return GeoTargetValue(boost::optional<GeoLineStringTargetValue>{});
125  }
126  return GeoTargetValue(
127  boost::optional<GeoLineStringTargetValue>{*decompress_coords<double, SQLTypeInfo>(
128  geo_ti, vals[0]->pointer, vals[0]->length)});
129  }
boost::optional< boost::variant< GeoPointTargetValue, GeoLineStringTargetValue, GeoPolyTargetValue, GeoMultiPolyTargetValue > > GeoTargetValue
Definition: TargetValue.h:161
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:266
std::shared_ptr< std::vector< double > > decompress_coords< double, SQLTypeInfo >(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: