27#include <geos/util/UnsupportedOperationException.h>
36ignore_unused_variable_warning(T
const &) {}
39using std::make_unique;
50template<
typename To,
typename From>
inline To down_cast(From* f)
53 (std::is_base_of<From,
54 typename std::remove_pointer<To>::type>::value),
55 "target type not derived from source type");
57 assert(f ==
nullptr ||
dynamic_cast<To
>(f) !=
nullptr);
59 return static_cast<To
>(f);
67void ensureNoCurvedComponents(
const T& geom)
69 if (geom.hasCurvedComponents()) {
70 throw UnsupportedOperationException(
"Curved geometry types are not supported.");
75void ensureNoCurvedComponents(
const T* geom)
77 ensureNoCurvedComponents(*geom);
Basic namespace for all GEOS functionalities.
Definition geos.h:39