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>
95 bool matches(
const std::string& requiredDimensionSymbols)
const;
110 char requiredDimensionSymbol);
124 static bool matches(
const std::string& actualDimensionSymbols,
125 const std::string& requiredDimensionSymbols);
159 void set(
const std::string& dimensionSymbols);
233 return matrix[
static_cast<size_t>(row)][
static_cast<size_t>(column)];
264 bool isTouches(
int dimensionOfGeometryA,
int dimensionOfGeometryB)
284 bool isCrosses(
int dimensionOfGeometryA,
int dimensionOfGeometryB)
310 bool isEquals(
int dimensionOfGeometryA,
int dimensionOfGeometryB)
326 bool isOverlaps(
int dimensionOfGeometryA,
int dimensionOfGeometryB)
371 static const int firstDim;
373 static const int secondDim;
376 std::array<std::array<int, 3>, 3> matrix;
Implementation of Dimensionally Extended Nine-Intersection Model (DE-9IM) matrix.
Definition: IntersectionMatrix.h:54
void setAll(int dimensionValue)
Changes the elements of this IntersectionMatrix to dimensionValue.
bool isCovers() const
Returns true if this IntersectionMatrix is T*****FF* or T****FF or ***T**FF* or ****T*FF*
bool isWithin() const
Returns true if this IntersectionMatrix is T*F**F***.
bool isCoveredBy() const
Returns true if this IntersectionMatrix is T*F**F*** *TF**F*** or **FT*F*** or **F*TF***
bool isIntersects() const
Returns true if isDisjoint returns false.
bool isTouches(int dimensionOfGeometryA, int dimensionOfGeometryB) const
Returns true if this IntersectionMatrix is FT*******, F**T***** or F***T****.
bool isEquals(int dimensionOfGeometryA, int dimensionOfGeometryB) const
Returns true if this IntersectionMatrix is T*F**FFF*.
void set(Location row, Location column, int dimensionValue)
Changes the value of one of this IntersectionMatrixs elements.
bool isCrosses(int dimensionOfGeometryA, int dimensionOfGeometryB) const
Returns true if this IntersectionMatrix is:
void setAtLeast(std::string minimumDimensionSymbols)
For each element in this IntersectionMatrix, changes the element to the corresponding minimum dimensi...
void setAtLeastIfValid(Location row, Location column, int minimumDimensionValue)
If row >= 0 and column >= 0, changes the specified element to minimumDimensionValue if the element is...
int get(geom::Location row, geom::Location column) const
Returns the value of one of this IntersectionMatrixs elements.
Definition: IntersectionMatrix.h:232
void set(const std::string &dimensionSymbols)
Changes the elements of this IntersectionMatrix to the dimension symbols in dimensionSymbols.
void add(IntersectionMatrix *other)
Adds one matrix to another.
IntersectionMatrix()
Default constructor.
bool isDisjoint() const
Returns true if this IntersectionMatrix is FF*FF****.
static bool matches(const std::string &actualDimensionSymbols, const std::string &requiredDimensionSymbols)
Returns true if each of the actual dimension symbols satisfies the corresponding required dimension s...
bool matches(const std::string &requiredDimensionSymbols) const
Returns whether the elements of this IntersectionMatrix satisfies the required dimension symbols.
IntersectionMatrix(const IntersectionMatrix &other)
Copy constructor.
bool isContains() const
Returns true if this IntersectionMatrix is T*****FF*.
static bool matches(int actualDimensionValue, char requiredDimensionSymbol)
Tests if given dimension value satisfies the dimension symbol.
std::string toString() const
Returns a nine-character String representation of this IntersectionMatrix.
bool isOverlaps(int dimensionOfGeometryA, int dimensionOfGeometryB) const
Returns true if this IntersectionMatrix is:
IntersectionMatrix(const std::string &elements)
Overriden constructor.
IntersectionMatrix * transpose()
Transposes this IntersectionMatrix.
void setAtLeast(Location row, Location column, int minimumDimensionValue)
Changes the specified element to minimumDimensionValue if the element is less.
std::ostream & operator<<(std::ostream &os, const Coordinate &c)
Output function.
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:34
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26