OmniSciDB  085a039ca4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{RelAlgTranslatorGeo.cpp} Namespace Reference

Functions

std::string suffix (SQLTypes type)
 
SQLTypes get_ti_from_geo (const Geospatial::GeoBase *geo)
 

Function Documentation

SQLTypes anonymous_namespace{RelAlgTranslatorGeo.cpp}::get_ti_from_geo ( const Geospatial::GeoBase geo)

Definition at line 235 of file RelAlgTranslatorGeo.cpp.

References CHECK, Geospatial::GeoBase::getType(), Geospatial::GeoBase::kLINESTRING, kLINESTRING, Geospatial::GeoBase::kMULTIPOLYGON, kMULTIPOLYGON, kNULLT, Geospatial::GeoBase::kPOINT, kPOINT, Geospatial::GeoBase::kPOLYGON, kPOLYGON, and UNREACHABLE.

235  {
236  CHECK(geo);
237  switch (geo->getType()) {
239  return kPOINT;
240  }
242  return kLINESTRING;
243  }
245  return kPOLYGON;
246  }
248  return kMULTIPOLYGON;
249  }
250  default:
251  UNREACHABLE();
252  return kNULLT;
253  }
254 }
#define UNREACHABLE()
Definition: Logger.h:267
#define CHECK(condition)
Definition: Logger.h:223
virtual GeoType getType() const =0

+ Here is the call graph for this function:

std::string anonymous_namespace{RelAlgTranslatorGeo.cpp}::suffix ( SQLTypes  type)

Definition at line 219 of file RelAlgTranslatorGeo.cpp.

References kLINESTRING, kMULTIPOLYGON, kPOINT, and kPOLYGON.

219  {
220  if (type == kPOINT) {
221  return std::string("_Point");
222  }
223  if (type == kLINESTRING) {
224  return std::string("_LineString");
225  }
226  if (type == kPOLYGON) {
227  return std::string("_Polygon");
228  }
229  if (type == kMULTIPOLYGON) {
230  return std::string("_MultiPolygon");
231  }
232  throw QueryNotSupported("Unsupported argument type");
233 }