17#include <geos/geom/Location.h>
18#include <geos/geom/Position.h>
19#include <geos/export.h>
92 int aDim = DIM_NOT_PART;
97 int bDim = DIM_NOT_PART;
103 std::string dimensionSymbol(
int dim)
const;
104 void locationString(uint8_t index,
bool isForward, std::ostream& os)
const;
122 , aLocLeft(LOC_UNKNOWN)
123 , aLocRight(LOC_UNKNOWN)
124 , aLocLine(LOC_UNKNOWN)
127 , bLocLeft(LOC_UNKNOWN)
128 , bLocRight(LOC_UNKNOWN)
129 , bLocLine(LOC_UNKNOWN) {};
140 initBoundary(p_index, p_locLeft, p_locRight, p_isHole);
143 int dimension(uint8_t index)
const {
return index == 0 ? aDim : bDim; };
144 void initBoundary(uint8_t index,
Location locLeft,
Location locRight,
bool p_isHole);
145 void initCollapse(uint8_t index,
bool p_isHole);
146 void initLine(uint8_t index);
147 void initNotPart(uint8_t index);
159 void setLocationAll(uint8_t index,
Location loc);
160 void setLocationCollapse(uint8_t index);
169 return aDim == DIM_LINE || bDim == DIM_LINE;
172 bool isLine(uint8_t index)
const
174 return index == 0 ? aDim == DIM_LINE : bDim == DIM_LINE;
177 bool isLinear(uint8_t index)
const
180 return aDim == DIM_LINE || aDim == DIM_COLLAPSE;
182 return bDim == DIM_LINE || bDim == DIM_COLLAPSE;
185 bool isKnown(uint8_t index)
const
188 return aDim != DIM_UNKNOWN;
190 return bDim != DIM_UNKNOWN;
193 bool isNotPart(uint8_t index)
const
196 return aDim == DIM_NOT_PART;
198 return bDim == DIM_NOT_PART;
201 bool isBoundaryEither()
const
203 return aDim == DIM_BOUNDARY || bDim == DIM_BOUNDARY;
206 bool isBoundaryBoth()
const
208 return aDim == DIM_BOUNDARY && bDim == DIM_BOUNDARY;
220 if (isLine())
return false;
221 return ! isBoundaryBoth();
230 return isBoundaryBoth() &&
234 bool isBoundary(uint8_t index)
const
237 return aDim == DIM_BOUNDARY;
239 return bDim == DIM_BOUNDARY;
242 bool isLineLocationUnknown(
int index)
const
245 return aLocLine == LOC_UNKNOWN;
248 return bLocLine == LOC_UNKNOWN;
258 if (aDim == DIM_BOUNDARY && bDim == DIM_NOT_PART) {
262 if (bDim == DIM_BOUNDARY && aDim == DIM_NOT_PART) {
277 return aLocLine == Location::INTERIOR;
279 return bLocLine == Location::INTERIOR;
282 bool isHole(uint8_t index)
const
292 bool isCollapse(uint8_t index)
const
294 return dimension(index) == DIM_COLLAPSE;
297 Location getLineLocation(uint8_t index)
const
313 if (aDim == DIM_COLLAPSE && aLocLine == Location::INTERIOR)
315 if (bDim == DIM_COLLAPSE && bLocLine == Location::INTERIOR)
336 return aLocLine == Location::INTERIOR;
338 return bLocLine == Location::INTERIOR;
355 bool isForward)
const
357 if (isBoundary(index)) {
358 return getLocation(index, position, isForward);
360 return getLineLocation(index);
376 Location getLocation(uint8_t index,
int position,
bool isForward)
const;
378 bool hasSides(uint8_t index)
const {
380 return aLocLeft != LOC_UNKNOWN
381 || aLocRight != LOC_UNKNOWN;
383 return bLocLeft != LOC_UNKNOWN
384 || bLocRight != LOC_UNKNOWN;
387 OverlayLabel copy()
const
389 OverlayLabel lbl = *
this;
393 friend std::ostream& operator<<(std::ostream& os,
const OverlayLabel& ol);
394 void toString(
bool isForward, std::ostream& os)
const;
A Position indicates the position of a Location relative to a graph component (Node,...
Definition: Position.h:37
@ RIGHT
An indicator that a Location is to the right of a GraphComponent.
Definition: Position.h:56
Definition: OverlayLabel.h:87
void setLocationLine(uint8_t index, Location loc)
Location getLocation(uint8_t index) const
Definition: OverlayLabel.h:369
bool isLineInterior(uint8_t index) const
Definition: OverlayLabel.h:333
bool isBoundaryCollapse() const
Definition: OverlayLabel.h:218
bool isInteriorCollapse() const
Definition: OverlayLabel.h:311
bool isCollapseAndNotPartInterior() const
Location getLocationBoundaryOrLine(uint8_t index, int position, bool isForward) const
Definition: OverlayLabel.h:352
bool isBoundaryTouch() const
Definition: OverlayLabel.h:228
bool isLineInArea(int8_t index) const
Definition: OverlayLabel.h:274
bool isBoundarySingleton() const
Definition: OverlayLabel.h:256
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: geos.h:39