Fishnet 2.0.1
Framework for Graph-Based Analysis of GIS Vector Data
Loading...
Searching...
No Matches
GeometryBase.hpp
Go to the documentation of this file.
1#pragma once
3
4namespace fishnet::geometry{
5
9
10template<typename G, typename T = typename std::remove_cvref_t<G>::numeric_type>
13 && requires(){
14 {std::remove_cvref_t<G>::type} -> std::convertible_to<GeometryType>;
15 typename std::remove_cvref_t<G>::numeric_type;
16 };
17};
18
19
20#include <string>
21namespace std {
22 static string to_string(fishnet::geometry::GeometryType type) noexcept {
23 switch(type) {
24 case fishnet::geometry::GeometryType::POINT: return "POINT";
25 case fishnet::geometry::GeometryType::SEGMENT: return "SEGMENT";
26 case fishnet::geometry::GeometryType::RAY: return "RAY";
27 case fishnet::geometry::GeometryType::LINE: return "LINE";
28 case fishnet::geometry::GeometryType::RING: return "RING";
29 case fishnet::geometry::GeometryType::POLYGON: return "POLYGON";
30 case fishnet::geometry::GeometryType::MULTIPOLYGON: return "MULTIPOLYGON";
31 default: return "undefined";
32 }
33 }
34}
Definition GeometryBase.hpp:11
Definition NumericConcepts.hpp:7
Helper concept which checks whether a class is an object, meaning it has a string representation,...
Definition ObjectConcepts.hpp:51
Definition BoundingBoxWrapper.hpp:5
GeometryType
Definition GeometryBase.hpp:6
STL namespace.
static string to_string(fishnet::geometry::GeometryType type) noexcept
Definition GeometryBase.hpp:22