23 #include <geos/export.h>
24 #include <geos/geom/Location.h>
25 #include <geos/geom/Position.h>
45 static constexpr
int NULL_VALUE = -1;
67 for(std::size_t i = 0; i < 2; i++) {
68 for(std::size_t j = 0; j < 3; j++) {
69 depth[i][j] = NULL_VALUE;
74 virtual ~
Depth() =
default;
76 int getDepth(
int geomIndex,
int posIndex)
const
78 return depth[geomIndex][posIndex];
81 void setDepth(
int geomIndex,
int posIndex,
int depthValue)
83 depth[geomIndex][posIndex] = depthValue;
88 if(depth[geomIndex][posIndex] <= 0) {
97 depth[geomIndex][posIndex]++;
106 for(std::size_t i = 0; i < 2; i++) {
107 for(std::size_t j = 0; j < 3; j++) {
108 if(depth[i][j] != NULL_VALUE) {
116 bool isNull(uint8_t geomIndex)
const
118 return depth[geomIndex][1] == NULL_VALUE;
121 bool isNull(uint8_t geomIndex, uint8_t posIndex)
const
123 return depth[geomIndex][posIndex] == NULL_VALUE;
126 int getDelta(
int geomIndex)
const
133 void add(
const Label& lbl);
135 std::string toString()
const;
@ LEFT
An indicator that a Location is to the left of a GraphComponent.
Definition: Position.h:50
@ RIGHT
An indicator that a Location is to the right of a GraphComponent.
Definition: Position.h:56
A Depth object records the topological depth of the sides of an Edge for up to two Geometries.
Definition: Depth.h:41
bool isNull() const
Definition: Depth.h:104
A Label indicates the topological relationship of a component of a topology graph to a given Geometry...
Definition: Label.h:57
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25