6namespace fishnet::geometry::__impl{
13 using numeric_type = T;
15 EnvelopeStub(T left, T top, T right, T bottom){}
16 bool contains(
const PointStub<T> & point)
const{
19 bool overlap(
const EnvelopeStub<T> & other)
const{
34 bool operator==(
const EnvelopeStub<T> & other)
const noexcept{
37 size_t hash() const noexcept {
40 std::string toString()
const{
49 using numeric_type = T;
51 RingStub(std::vector<SegmentStub<T>> segments){}
52 RingStub(std::vector<PointStub<T>> points){}
53 bool operator==(
const RingStub<T> & other)
const noexcept{
56 std::vector<SegmentStub<T>> getSegments()
const{
59 std::vector<PointStub<T>> getPoints()
const{
62 RingStub<T> getBoundary()
const{
65 std::vector<RingStub<T>> getHoles()
const{
71 PointStub<double> centroid()
const{
72 return PointStub<double>(0,0);
74 EnvelopeStub<T> aaBB()
const{
75 return EnvelopeStub<T>(0, 0, 0, 0);
77 bool isInside(PointStub<T> point)
const{
80 bool isOnBoundary(PointStub<T> point)
const{
83 bool isOutside(PointStub<T> point)
const{
86 bool contains(PointStub<T> point)
const{
89 bool contains(SegmentStub<T> segment)
const{
92 bool contains(RingStub<T> ring)
const{
95 bool intersects(SegmentStub<T> segment)
const{
98 bool intersects(LineStub<T> line)
const{
101 std::vector<PointStub<double>> intersections(SegmentStub<T> segment)
const{
104 std::vector<PointStub<double>> intersections(LineStub<T> line)
const{
107 bool crosses(RingStub<T> ring)
const{
110 bool touches(RingStub<T> ring)
const{
113 double distance(RingStub<T> ring)
const{
116 size_t hash() const noexcept {
119 std::string toString()
const{
128concept IEnvelope =
GeometryBase<E> &&
requires(
const std::remove_cvref_t<E> & env,
const __impl::PointStub<typename std::remove_cvref_t<E>::numeric_type> & point){
129 {env.contains(point)} -> std::same_as<bool>;
130 {env.overlap(env)} -> std::same_as<bool>;
131 {env.left()} -> std::convertible_to<typename std::remove_cvref_t<E>::numeric_type>;
132 {env.right()} -> std::convertible_to<typename std::remove_cvref_t<E>::numeric_type>;
133 {env.top()} -> std::convertible_to<typename std::remove_cvref_t<E>::numeric_type>;
134 {env.bottom()} -> std::convertible_to<typename std::remove_cvref_t<E>::numeric_type>;
144 const std::remove_cvref_t<R> & ring,
145 const __impl::RingStub<typename std::remove_cvref_t<R>::numeric_type> & otherRing,
146 const __impl::SegmentStub<typename std::remove_cvref_t<R>::numeric_type> & segment,
147 const __impl::LineStub<typename std::remove_cvref_t<R>::numeric_type> & line,
148 const __impl::PointStub<typename std::remove_cvref_t<R>::numeric_type> & point
152 {ring.getBoundary()} -> std::convertible_to<std::remove_cvref_t<R>>;
153 {ring.getHoles()} -> std::ranges::range;
154 {ring.area()} -> std::convertible_to<double>;
155 {ring.centroid()} ->
IPoint;
157 {ring.isInside(point)} -> std::same_as<bool>;
158 {ring.isOnBoundary(point)} -> std::same_as<bool>;
159 {ring.isOutside(point)} -> std::same_as<bool>;
160 {ring.contains(point)} -> std::same_as<bool>;
161 {ring.contains(segment)} -> std::same_as<bool>;
162 {ring.contains(otherRing)} -> std::same_as<bool>;
163 {ring.intersects(segment)} -> std::same_as<bool>;
164 {ring.intersects(line)} -> std::same_as<bool>;
167 {ring.crosses(otherRing)} -> std::same_as<bool>;
168 {ring.touches(otherRing)} -> std::same_as<bool>;
169 {ring.distance(otherRing)} -> std::convertible_to<double>;
IPolygon implementation backed by an OGRPolygon.
Definition OGRPolygonAdapter.hpp:22
Definition GeometryBase.hpp:11
Interface for a point.
Definition IPoint.hpp:92
Interface for a ring A ring is a closed loop of segments, forming a boundary of a shape.
Definition IRing.hpp:143
Definition IPoint.hpp:138
Definition ISegment.hpp:141
Definition BoundingBoxWrapper.hpp:5