OmniSciDB  fe05a0c208
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 225 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.

225  {
226  CHECK(geo);
227  switch (geo->getType()) {
229  return kPOINT;
230  }
232  return kLINESTRING;
233  }
235  return kPOLYGON;
236  }
238  return kMULTIPOLYGON;
239  }
240  default:
241  UNREACHABLE();
242  return kNULLT;
243  }
244 }
#define UNREACHABLE()
Definition: Logger.h:247
#define CHECK(condition)
Definition: Logger.h:203
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 209 of file RelAlgTranslatorGeo.cpp.

References kLINESTRING, kMULTIPOLYGON, kPOINT, and kPOLYGON.

209  {
210  if (type == kPOINT) {
211  return std::string("_Point");
212  }
213  if (type == kLINESTRING) {
214  return std::string("_LineString");
215  }
216  if (type == kPOLYGON) {
217  return std::string("_Polygon");
218  }
219  if (type == kMULTIPOLYGON) {
220  return std::string("_MultiPolygon");
221  }
222  throw QueryNotSupported("Unsupported argument type");
223 }