use of com.revolsys.geometry.model.IntersectionMatrix in project com.revolsys.open by revolsys.
the class RelateOp method relate.
/**
* Computes the {@link IntersectionMatrix} for the spatial relationship
* between two {@link Geometry}s using a specified Boundary Node Rule.
*
* @param a a Geometry to test
* @param b a Geometry to test
* @param boundaryNodeRule the Boundary Node Rule to use
* @return the IntersectonMatrix for the spatial relationship between the input geometries
*/
public static IntersectionMatrix relate(final Geometry a, final Geometry b, final BoundaryNodeRule boundaryNodeRule) {
final RelateOp relOp = new RelateOp(a, b, boundaryNodeRule);
final IntersectionMatrix im = relOp.getIntersectionMatrix();
return im;
}
use of com.revolsys.geometry.model.IntersectionMatrix in project com.revolsys.open by revolsys.
the class IntersectionMatrixTest method testIsEquals.
public void testIsEquals() {
assertTrue(new IntersectionMatrix("0FFFFFFF2").isEquals(P, P));
assertTrue(new IntersectionMatrix("1FFF0FFF2").isEquals(L, L));
assertTrue(new IntersectionMatrix("2FFF1FFF2").isEquals(A, A));
assertTrue(!new IntersectionMatrix("0F0FFFFF2").isEquals(P, P));
assertTrue(new IntersectionMatrix("1FFF1FFF2").isEquals(L, L));
assertTrue(!new IntersectionMatrix("2FFF1*FF2").isEquals(A, A));
assertTrue(!new IntersectionMatrix("0FFFFFFF2").isEquals(P, L));
assertTrue(!new IntersectionMatrix("1FFF0FFF2").isEquals(L, A));
assertTrue(!new IntersectionMatrix("2FFF1FFF2").isEquals(A, P));
}
use of com.revolsys.geometry.model.IntersectionMatrix in project com.revolsys.open by revolsys.
the class IntersectionMatrixTest method testIsCrosses.
public void testIsCrosses() {
assertTrue(new IntersectionMatrix("TFTFFFFFF").isCrosses(P, L));
assertTrue(!new IntersectionMatrix("TFTFFFFFF").isCrosses(L, P));
assertTrue(!new IntersectionMatrix("TFFFFFTFF").isCrosses(P, L));
assertTrue(new IntersectionMatrix("TFFFFFTFF").isCrosses(L, P));
assertTrue(new IntersectionMatrix("0FFFFFFFF").isCrosses(L, L));
assertTrue(!new IntersectionMatrix("1FFFFFFFF").isCrosses(L, L));
}
use of com.revolsys.geometry.model.IntersectionMatrix in project com.revolsys.open by revolsys.
the class IntersectionMatrixTest method testIsIntersects.
public void testIsIntersects() {
assertTrue(!new IntersectionMatrix("FF*FF****").isIntersects());
assertTrue(!new IntersectionMatrix("FF1FF2T*0").isIntersects());
assertTrue(new IntersectionMatrix("*F*FF****").isIntersects());
}
use of com.revolsys.geometry.model.IntersectionMatrix in project com.revolsys.open by revolsys.
the class IntersectionMatrixTest method testIsContains.
public void testIsContains() {
assertTrue(!new IntersectionMatrix("T0F00F000").isContains());
assertTrue(new IntersectionMatrix("T00000FF0").isContains());
}
Aggregations