23#include <geos/export.h>
24#include <geos/geom/Location.h>
25#include <geos/geom/Position.h>
44 static constexpr int NULL_VALUE = -1;
66 for(std::size_t i = 0; i < 2; i++) {
67 for(std::size_t j = 0; j < 3; j++) {
68 depth[i][j] = NULL_VALUE;
73 virtual ~Depth() =
default;
75 int getDepth(
int geomIndex,
int posIndex)
const
77 return depth[geomIndex][posIndex];
80 void setDepth(
int geomIndex,
int posIndex,
int depthValue)
82 depth[geomIndex][posIndex] = depthValue;
87 if(depth[geomIndex][posIndex] <= 0) {
96 depth[geomIndex][posIndex]++;
105 for(std::size_t i = 0; i < 2; i++) {
106 for(std::size_t j = 0; j < 3; j++) {
107 if(depth[i][j] != NULL_VALUE) {
115 bool isNull(uint8_t geomIndex)
const
117 return depth[geomIndex][1] == NULL_VALUE;
120 bool isNull(uint8_t geomIndex, uint8_t posIndex)
const
122 return depth[geomIndex][posIndex] == NULL_VALUE;
125 int getDelta(
int geomIndex)
const
132 void add(
const Label& lbl);
134 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:40
bool isNull() const
Definition: Depth.h:103
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: geos.h:39