19 #ifndef GEOS_GEOM_INTERSECTIONMATRIX_H
20 #define GEOS_GEOM_INTERSECTIONMATRIX_H
22 #include <geos/geom/Location.h>
24 #include <geos/export.h>
28 #include <geos/inline.h>
54 class GEOS_DLL IntersectionMatrix {
74 IntersectionMatrix(
const std::string& elements);
83 IntersectionMatrix(
const IntersectionMatrix& other);
95 bool matches(
const std::string& requiredDimensionSymbols)
const;
109 static bool matches(
int actualDimensionValue,
110 char requiredDimensionSymbol);
124 static bool matches(
const std::string& actualDimensionSymbols,
125 const std::string& requiredDimensionSymbols);
137 void add(IntersectionMatrix* other);
159 void set(
const std::string& dimensionSymbols);
195 void setAtLeastIfValid(
Location row,
Location column,
int minimumDimensionValue);
207 void setAtLeast(std::string minimumDimensionSymbols);
217 void setAll(
int dimensionValue);
233 return matrix[
static_cast<size_t>(row)][
static_cast<size_t>(column)];
242 bool isDisjoint()
const;
250 bool isIntersects()
const;
264 bool isTouches(
int dimensionOfGeometryA,
int dimensionOfGeometryB)
284 bool isCrosses(
int dimensionOfGeometryA,
int dimensionOfGeometryB)
292 bool isWithin()
const;
299 bool isContains()
const;
310 bool isEquals(
int dimensionOfGeometryA,
int dimensionOfGeometryB)
326 bool isOverlaps(
int dimensionOfGeometryA,
int dimensionOfGeometryB)
337 bool isCovers()
const;
348 bool isCoveredBy()
const;
367 std::string toString()
const;
371 static const int firstDim;
373 static const int secondDim;
376 std::array<std::array<int, 3>, 3> matrix;
386 #endif // ndef GEOS_GEOM_INTERSECTIONMATRIX_H