3#ifndef BOAT_GEOMETRY_VOCABULARY_HPP
4#define BOAT_GEOMETRY_VOCABULARY_HPP
6#include <boat/detail/utility.hpp>
7#include <boost/geometry/geometries/adapted/std_variant.hpp>
8#include <boost/geometry/geometries/geometries.hpp>
9#include <boost/qvm/mat.hpp>
14namespace model = boost::geometry::model;
17using tag = boost::geometry::tag<T>::type;
20constexpr bool has_tag = !std::is_same_v<tag<T>,
void>;
29concept box = std::same_as<tag<T>, boost::geometry::box_tag>;
32concept dynamic = std::same_as<tag<T>, boost::geometry::dynamic_geometry_tag>;
35concept linestring = std::same_as<tag<T>, boost::geometry::linestring_tag>;
38concept multi = std::derived_from<tag<T>, boost::geometry::multi_tag>;
41concept multi_point = std::same_as<tag<T>, boost::geometry::multi_point_tag>;
44concept point = std::same_as<tag<T>, boost::geometry::point_tag>;
47concept polygon = std::same_as<tag<T>, boost::geometry::polygon_tag>;
49template <
class T,
class U>
53concept single = std::derived_from<tag<T>, boost::geometry::single_tag>;
58template <
class CoordSys>
60 using point = model::d2::point_xy<double, CoordSys>;
62 using polygon = model::polygon<point, false, true>;
66 using box = model::box<point>;
68 using grid = std::map<double, multi_point>;
88 return {g.x(), g.y()};
93 return {(*this)(g.min_corner()), (*this)(g.max_corner())};
99using matrix = boost::qvm::mat<double, 3, 3>;
113 requires requires {
typename T::boat_geometry_tag; }
114struct boost::geometry::traits::tag<T> {
115 using type = T::boat_geometry_tag;
Definition vocabulary.hpp:29
Definition vocabulary.hpp:56
Definition vocabulary.hpp:32
Definition vocabulary.hpp:35
Definition vocabulary.hpp:41
Definition vocabulary.hpp:38
Definition vocabulary.hpp:105
Definition vocabulary.hpp:44
Definition vocabulary.hpp:47
Definition vocabulary.hpp:50
Definition vocabulary.hpp:53
Definition vocabulary.hpp:26
Definition algorithm.hpp:10
d2< boost::geometry::cs::geographic< boost::geometry::degree > > geographic
Definition vocabulary.hpp:98
constexpr bool has_tag
Definition vocabulary.hpp:20
constexpr auto variant_index_v
Definition vocabulary.hpp:108
d2< typename boost::geometry::coordinate_system< T >::type > d2_of
Definition vocabulary.hpp:102
boost::geometry::tag< T >::type tag
Definition vocabulary.hpp:17
d2< boost::geometry::cs::cartesian > cartesian
Definition vocabulary.hpp:97
boost::qvm::mat< double, 3, 3 > matrix
Definition vocabulary.hpp:99
Definition vocabulary.hpp:81
boost::geometry::geometry_collection_tag boat_geometry_tag
Definition vocabulary.hpp:83
Definition vocabulary.hpp:59
model::multi_polygon< polygon > multi_polygon
Definition vocabulary.hpp:65
d2< CoordSys >::box operator()(geometry::box auto const &g) const
Definition vocabulary.hpp:91
std::variant< point, linestring, polygon, multi_point, multi_linestring, multi_polygon, geometry_collection > variant
Definition vocabulary.hpp:72
model::d2::point_xy< double, CoordSys > point
Definition vocabulary.hpp:60
model::segment< point > segment
Definition vocabulary.hpp:67
std::map< double, multi_point > grid
Definition vocabulary.hpp:68
d2< CoordSys >::point operator()(geometry::point auto const &g) const
Definition vocabulary.hpp:86
model::multi_linestring< linestring > multi_linestring
Definition vocabulary.hpp:64
model::box< point > box
Definition vocabulary.hpp:66
T::boat_geometry_tag type
Definition vocabulary.hpp:115