Search in sources :

Example 16 with IntersectionMatrix

use of com.revolsys.geometry.model.IntersectionMatrix in project com.revolsys.open by revolsys.

the class IntersectionMatrixTest method testTranspose.

public void testTranspose() {
    final IntersectionMatrix x = new IntersectionMatrix("012*TF012");
    final IntersectionMatrix i = new IntersectionMatrix(x);
    final IntersectionMatrix j = i.transpose();
    assertSame(i, j);
    assertEquals("0*01T12F2", i.toString());
    assertEquals("012*TF012", x.toString());
}
Also used : IntersectionMatrix(com.revolsys.geometry.model.IntersectionMatrix)

Example 17 with IntersectionMatrix

use of com.revolsys.geometry.model.IntersectionMatrix in project com.revolsys.open by revolsys.

the class RelateTest method runRelateTest.

void runRelateTest(final String wkt1, final String wkt2, final String expectedIM) throws ParseException {
    final Geometry g1 = this.geometryFactory.geometry(wkt1);
    final Geometry g2 = this.geometryFactory.geometry(wkt2);
    final IntersectionMatrix im = RelateOp.relate(g1, g2);
    final String imStr = im.toString();
    // System.out.println(imStr);
    assertTrue(im.matches(expectedIM));
}
Also used : Geometry(com.revolsys.geometry.model.Geometry) IntersectionMatrix(com.revolsys.geometry.model.IntersectionMatrix)

Aggregations

IntersectionMatrix (com.revolsys.geometry.model.IntersectionMatrix)17 Geometry (com.revolsys.geometry.model.Geometry)2 LineString (com.revolsys.geometry.model.LineString)2 EdgeEnd (com.revolsys.geometry.geomgraph.EdgeEnd)1 SegmentIntersector (com.revolsys.geometry.geomgraph.index.SegmentIntersector)1 BoundingBox (com.revolsys.geometry.model.BoundingBox)1