OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Geospatial::GeoTypesError Class Reference

#include <Types.h>

+ Inheritance diagram for Geospatial::GeoTypesError:
+ Collaboration diagram for Geospatial::GeoTypesError:

Public Member Functions

 GeoTypesError (const std::string &type, const int ogr_err)
 
 GeoTypesError (const std::string &type, const std::string &err)
 

Static Private Member Functions

static std::string OGRErrorToStr (const int ogr_err)
 

Detailed Description

Definition at line 36 of file Types.h.

Constructor & Destructor Documentation

Geospatial::GeoTypesError::GeoTypesError ( const std::string &  type,
const int  ogr_err 
)
inlineexplicit

Definition at line 38 of file Types.h.

39  : std::runtime_error("Geo" + type +
40  " Error: " + GeoTypesError::OGRErrorToStr(ogr_err)) {}
static std::string OGRErrorToStr(const int ogr_err)
Definition: Types.cpp:119
Geospatial::GeoTypesError::GeoTypesError ( const std::string &  type,
const std::string &  err 
)
inlineexplicit

Definition at line 41 of file Types.h.

42  : std::runtime_error("Geo" + type + " Error: " + err) {}

Member Function Documentation

std::string Geospatial::GeoTypesError::OGRErrorToStr ( const int  ogr_err)
staticprivate

Definition at line 119 of file Types.cpp.

References to_string().

119  {
120  switch (ogr_err) {
121  case OGRERR_NOT_ENOUGH_DATA:
122  return std::string("not enough input data");
123  case OGRERR_NOT_ENOUGH_MEMORY:
124  return std::string("not enough memory");
125  case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
126  return std::string("unsupported geometry type");
127  case OGRERR_UNSUPPORTED_OPERATION:
128  return std::string("unsupported operation");
129  case OGRERR_CORRUPT_DATA:
130  return std::string("corrupt input data");
131  case OGRERR_FAILURE:
132  return std::string("ogr failure");
133  case OGRERR_UNSUPPORTED_SRS:
134  return std::string("unsupported spatial reference system");
135  case OGRERR_INVALID_HANDLE:
136  return std::string("invalid file handle");
137 #if (GDAL_VERSION_MAJOR > 1)
138  case OGRERR_NON_EXISTING_FEATURE:
139  return std::string("feature does not exist in input geometry");
140 #endif
141  default:
142  return std::string("Unknown OGOR error encountered: ") + std::to_string(ogr_err);
143  }
144 }
std::string to_string(char const *&&v)

+ Here is the call graph for this function:


The documentation for this class was generated from the following files: