OGS
GeoType.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#include "GeoType.h"
5
6#include <cstdlib>
7
8#include "BaseLib/Error.h"
9
10namespace GeoLib
11{
12std::string convertGeoTypeToString(GEOTYPE geo_type)
13{
14 switch (geo_type)
15 {
16 case GEOTYPE::POINT:
17 return "POINT";
19 return "POLYLINE";
21 return "SURFACE";
22 }
23
24 // Cannot happen, because switch covers all cases.
25 // Used to silence compiler warning.
26 OGS_FATAL("convertGeoTypeToString(): Given geo type is not supported");
27}
28
29} // end namespace GeoLib
#define OGS_FATAL(...)
Definition Error.h:19
std::string convertGeoTypeToString(GEOTYPE geo_type)
Definition GeoType.cpp:12
GEOTYPE
Definition GeoType.h:12