| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectcom.vividsolutions.jts.geom.IntersectionMatrixpublic class IntersectionMatrixextends java.lang.Objectimplements CloneableConstructor Summary | |
| |
| |
| |
Method Summary | |
void |
|
int |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
static boolean |
|
static boolean |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
String |
|
IntersectionMatrix |
|
public IntersectionMatrix()
Creates anIntersectionMatrixwithFALSEdimension values.
public IntersectionMatrix(String elements)
Creates anIntersectionMatrixwith the given dimension symbols.
- Parameters:
elements- a String of nine dimension symbols in row major order
public IntersectionMatrix(IntersectionMatrix other)
Creates anIntersectionMatrixwith the same elements asother.
- Parameters:
other- anIntersectionMatrixto copy
public void add(IntersectionMatrix im)
Adds one matrix to another. Addition is defined by taking the maximum dimension value of each position in the summand matrices.
- Parameters:
im- the matrix to add
public int get(int row,
int column)Returns the value of one of thisIntersectionMatrixs elements.
- Parameters:
row- the row of thisIntersectionMatrix, indicating the interior, boundary or exterior of the firstGeometrycolumn- the column of thisIntersectionMatrix, indicating the interior, boundary or exterior of the secondGeometry
- Returns:
- the dimension value at the given matrix position.
public boolean isContains()
Returnstrueif thisIntersectionMatrixis T*****FF*.
- Returns:
trueif the firstGeometrycontains the second
public boolean isCoveredBy()
Returnstrueif thisIntersectionMatrixisT*F**F***or*TF**F***or**FT*F***or**F*TF***
- Returns:
trueif the firstGeometrycovers the second
public boolean isCovers()
Returnstrueif thisIntersectionMatrixisT*****FF*or*T****FF*or***T**FF*or****T*FF*
- Returns:
trueif the firstGeometrycovers the second
public boolean isCrosses(int dimensionOfGeometryA,
int dimensionOfGeometryB)Returnstrueif this geometry crosses the specified geometry. Thecrossespredicate has the following equivalent definitions:For any other combination of dimensions this predicate returns
- The geometries have some but not all interior points in common.
- The DE-9IM Intersection Matrix for the two geometries is
- T*T****** (for P/L, P/A, and L/A situations)
- T*****T** (for L/P, L/A, and A/L situations)
- 0******** (for L/L situations)
false. The SFS defined this predicate only for P/L, P/A, L/L, and L/A situations. JTS extends the definition to apply to L/P, A/P and A/L situations as well. This makes the relation symmetric.
- Parameters:
dimensionOfGeometryA- the dimension of the firstGeometrydimensionOfGeometryB- the dimension of the secondGeometry
- Returns:
trueif the twoGeometrys related by thisIntersectionMatrixcross.
public boolean isDisjoint()
Returnstrueif thisIntersectionMatrixis FF*FF****.
- Returns:
trueif the twoGeometrys related by thisIntersectionMatrixare disjoint
public boolean isEquals(int dimensionOfGeometryA,
int dimensionOfGeometryB)Returnstrueif thisIntersectionMatrixis T*F**FFF*.
- Parameters:
dimensionOfGeometryA- the dimension of the firstGeometrydimensionOfGeometryB- the dimension of the secondGeometry
- Returns:
trueif the twoGeometrys related by thisIntersectionMatrixare equal; theGeometrys must have the same dimension for this function to returntrue
public boolean isIntersects()
ReturnstrueifisDisjointreturns false.
- Returns:
trueif the twoGeometrys related by thisIntersectionMatrixintersect
public boolean isOverlaps(int dimensionOfGeometryA,
int dimensionOfGeometryB)Returnstrueif thisIntersectionMatrixis.
- T*T***T** (for two points or two surfaces)
- 1*T***T** (for two curves)
- Parameters:
dimensionOfGeometryA- the dimension of the firstGeometrydimensionOfGeometryB- the dimension of the secondGeometry
- Returns:
trueif the twoGeometrys related by thisIntersectionMatrixoverlap. For this function to returntrue, theGeometrys must be two points, two curves or two surfaces.
public boolean isTouches(int dimensionOfGeometryA,
int dimensionOfGeometryB)Returnstrueif thisIntersectionMatrixis FT*******, F**T***** or F***T****.
- Parameters:
dimensionOfGeometryA- the dimension of the firstGeometrydimensionOfGeometryB- the dimension of the secondGeometry
- Returns:
trueif the twoGeometrys related by thisIntersectionMatrixtouch; Returns false if bothGeometrys are points.
public boolean isWithin()
Returnstrueif thisIntersectionMatrixis T*F**F***.
- Returns:
trueif the firstGeometryis within the second
public boolean matches(String requiredDimensionSymbols)
Returns whether the elements of thisIntersectionMatrixsatisfies the required dimension symbols.
- Parameters:
requiredDimensionSymbols- nine dimension symbols with which to compare the elements of thisIntersectionMatrix. Possible values are{T, F, * , 0, 1, 2}.
- Returns:
trueif thisIntersectionMatrixmatches the required dimension symbols
public static boolean matches(String actualDimensionSymbols,
String requiredDimensionSymbols)Returns true if each of the actual dimension symbols satisfies the corresponding required dimension symbol.
- Parameters:
actualDimensionSymbols- nine dimension symbols to validate. Possible values are{T, F, * , 0, 1, 2}.requiredDimensionSymbols- nine dimension symbols to validate against. Possible values are{T, F, * , 0, 1, 2}.
- Returns:
- true if each of the required dimension symbols encompass the corresponding actual dimension symbol
public static boolean matches(int actualDimensionValue,
char requiredDimensionSymbol)Returns true if the dimension value satisfies the dimension symbol.
- Parameters:
actualDimensionValue- a number that can be stored in theIntersectionMatrix. Possible values are{TRUE, FALSE, DONTCARE, 0, 1, 2}.requiredDimensionSymbol- a character used in the string representation of anIntersectionMatrix. Possible values are{T, F, * , 0, 1, 2}.
- Returns:
- true if the dimension symbol encompasses the dimension value
public void set(String dimensionSymbols)
Changes the elements of thisIntersectionMatrixto the dimension symbols indimensionSymbols.
- Parameters:
dimensionSymbols- nine dimension symbols to which to set thisIntersectionMatrixs elements. Possible values are{T, F, * , 0, 1, 2}
public void set(int row,
int column,
int dimensionValue)Changes the value of one of thisIntersectionMatrixs elements.
- Parameters:
row- the row of thisIntersectionMatrix, indicating the interior, boundary or exterior of the firstGeometrycolumn- the column of thisIntersectionMatrix, indicating the interior, boundary or exterior of the secondGeometrydimensionValue- the new value of the element
public void setAll(int dimensionValue)
Changes the elements of thisIntersectionMatrixtodimensionValue.
- Parameters:
dimensionValue- the dimension value to which to set thisIntersectionMatrixs elements. Possible values{TRUE, FALSE, DONTCARE, 0, 1, 2}.
public void setAtLeast(String minimumDimensionSymbols)
For each element in thisIntersectionMatrix, changes the element to the corresponding minimum dimension symbol if the element is less.
- Parameters:
minimumDimensionSymbols- nine dimension symbols with which to compare the elements of thisIntersectionMatrix. The order of dimension values from least to greatest is{DONTCARE, TRUE, FALSE, 0, 1, 2}.
public void setAtLeast(int row,
int column,
int minimumDimensionValue)Changes the specified element tominimumDimensionValueif the element is less.
- Parameters:
row- the row of thisIntersectionMatrix, indicating the interior, boundary or exterior of the firstGeometrycolumn- the column of thisIntersectionMatrix, indicating the interior, boundary or exterior of the secondGeometryminimumDimensionValue- the dimension value with which to compare the element. The order of dimension values from least to greatest is{DONTCARE, TRUE, FALSE, 0, 1, 2}.
public void setAtLeastIfValid(int row,
int column,
int minimumDimensionValue)If row >= 0 and column >= 0, changes the specified element tominimumDimensionValueif the element is less. Does nothing if row <0 or column <320.
- Parameters:
row- the row of thisIntersectionMatrix, indicating the interior, boundary or exterior of the firstGeometrycolumn- the column of thisIntersectionMatrix, indicating the interior, boundary or exterior of the secondGeometryminimumDimensionValue- the dimension value with which to compare the element. The order of dimension values from least to greatest is{DONTCARE, TRUE, FALSE, 0, 1, 2}.
public String toString()
Returns a nine-characterStringrepresentation of thisIntersectionMatrix.
- Returns:
- the nine dimension symbols of this
IntersectionMatrixin row-major order.
public IntersectionMatrix transpose()
Transposes this IntersectionMatrix.
- Returns:
- this
IntersectionMatrixas a convenience