4namespace fishnet::geometry::__impl{
8 using numeric_type = T;
9 using polygon_type = PolygonStub<T>;
10 constexpr static GeometryType type = GeometryType::MULTIPOLYGON;
11 MultiPolygonStub(std::vector<PolygonStub<T>> polygons){}
12 MultiPolygonStub(PolygonStub<T> polygon){}
13 bool operator==(
const MultiPolygonStub<T> & other)
const noexcept{
16 std::vector<PolygonStub<T>> getPolygons()
const{
19 bool addPolygon(PolygonStub<T> polygon){
22 bool removePolygon(PolygonStub<T> polygon){
28 PointStub<double> centroid()
const{
29 return PointStub<double>(0,0);
31 EnvelopeStub<T> aaBB()
const{
32 return EnvelopeStub<T>(0, 0, 0, 0);
34 bool isInside(PointStub<T> point)
const{
37 bool isOnBoundary(PointStub<T> point)
const{
40 bool isOutside(PointStub<T> point)
const{
43 bool containsInHole(PolygonStub<T> polygon)
const{
46 bool contains(PointStub<T> point)
const{
49 bool contains(SegmentStub<T> segment)
const{
52 bool contains(PolygonStub<T> polygon)
const{
55 bool intersects(SegmentStub<T> segment)
const{
58 bool intersects(LineStub<T> line)
const{
61 std::vector<PointStub<T>> intersections(SegmentStub<T> segment)
const{
64 std::vector<PointStub<T>> intersections(LineStub<T> line)
const{
67 bool crosses(PolygonStub<T> polygon)
const{
70 bool touches(PolygonStub<T> polygon)
const{
73 double distance(PolygonStub<T> polygon)
const{
76 size_t hash() const noexcept {
79 std::string toString()
const {
94 const std::remove_cvref_t<M> & multiPolygon,
95 std::remove_cvref_t<M> & mutableMultiPolygon,
96 const typename std::remove_cvref_t<M>::polygon_type & ownPolygon,
97 const __impl::PolygonStub<typename std::remove_cvref_t<M>::numeric_type> & polygon,
98 const __impl::PointStub<typename std::remove_cvref_t<M>::numeric_type> & point,
99 const __impl::SegmentStub<typename std::remove_cvref_t<M>::numeric_type> & segment,
100 const __impl::LineStub<typename std::remove_cvref_t<M>::numeric_type> & line
102 typename std::remove_cvref_t<M>::polygon_type;
104 {mutableMultiPolygon.addPolygon(ownPolygon)} -> std::same_as<bool>;
105 {mutableMultiPolygon.removePolygon(ownPolygon)} -> std::same_as<bool>;
106 {multiPolygon.area()} -> std::convertible_to<double>;
107 {multiPolygon.centroid()} ->
IPoint;
109 {multiPolygon.isInside(point)} -> std::same_as<bool>;
110 {multiPolygon.isOnBoundary(point)} -> std::same_as<bool>;
111 {multiPolygon.isOutside(point)} -> std::same_as<bool>;
112 {multiPolygon.containsInHole(polygon)} -> std::same_as<bool>;
113 {multiPolygon.contains(point)} -> std::same_as<bool>;
114 {multiPolygon.contains(segment)} -> std::same_as<bool>;
115 {multiPolygon.contains(polygon)} -> std::same_as<bool>;
116 {multiPolygon.intersects(segment)} -> std::same_as<bool>;
117 {multiPolygon.intersects(line)} -> std::same_as<bool>;
118 {multiPolygon.intersections(segment)} ->
PointRange;
119 {multiPolygon.intersections(line)} ->
PointRange;
120 {multiPolygon.crosses(polygon)} -> std::same_as<bool>;
121 {multiPolygon.touches(polygon)} -> std::same_as<bool>;
122 {multiPolygon.distance(polygon)} -> std::convertible_to<double>;
IPolygon implementation backed by an OGRPolygon.
Definition OGRPolygonAdapter.hpp:22
Definition GeometryBase.hpp:11
Interface for a multi-polygon A multi-polygon is a collection of polygons.
Definition IMultiPolygon.hpp:93
Interface for a point.
Definition IPoint.hpp:92
Definition IPoint.hpp:138
Definition IPolygon.hpp:134
Definition BoundingBoxWrapper.hpp:5