Package chunmap.model.relate

Examples of chunmap.model.relate.IntersectionMatrix.match()


    LineString ls = (LineString) g2;

    // IntersectionMatrix rt2 = ComputeIm.getInstance().getIM(ls, pg);
    LineString_Polygon l2a = new LineString_Polygon(ls, pg);
    IntersectionMatrix rt = l2a.getIM();
    assertTrue(rt.match(IntersectionMatrix.CrossesPattern));

  }

  @Test
  public void testGetIM2() {
View Full Code Here


    LineString ls = (LineString) g2;

    // IntersectionMatrix rt = ComputeIm.getInstance().getIM(ls, pg);
    LineString_Polygon l2a = new LineString_Polygon(ls, pg);
    IntersectionMatrix rt = l2a.getIM();
    assertTrue(rt.match(IntersectionMatrix.DisjointPattern));

  }

  @Test
  public void testGetIM3() {
View Full Code Here

    LineString ls = (LineString) g2;

    // IntersectionMatrix rt = ComputeIm.getInstance().getIM(ls, pg);
    LineString_Polygon l2a = new LineString_Polygon(ls, pg);
    IntersectionMatrix rt = l2a.getIM();
    assertTrue(rt.match(IntersectionMatrix.DisjointPattern));

  }

  @Test
  public void testGetIM4() {
View Full Code Here

    GeoPoint p1 = new GeoPoint(1, 0);

    ComputeIm p2r = new Point_LinearRing(p1, lr);
    IntersectionMatrix rt = p2r.getIM();

    assertTrue(rt.match(IntersectionMatrix.WithinsPattern));
  }

  @Test
  public void testGetIM2() {
    WktReader wkt = new WktReader();
View Full Code Here

    GeoPoint p1 = new GeoPoint(2, 2);

    ComputeIm p2r = new Point_LinearRing(p1, lr);
    IntersectionMatrix rt = p2r.getIM();

    assertTrue(rt.match(IntersectionMatrix.DisjointPattern));
  }
}
View Full Code Here

    Geometry g3 = wkt.read("POLYGON((4 0.5,6 0.5,6.5 0,6 -1,4 0,4 0.5))");
    Polygon pg3 = (Polygon) g3;

    IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(
        pg, pg2).getIM();
    assertTrue(rt.match(IntersectionMatrix.DisjointPattern));

    // IntersectionMatrix rt2 = ComputeIm.getInstance().getIM(pg, pg3);
    Polygon_Polygon l2a = new Polygon_Polygon(pg3, pg);
    IntersectionMatrix rt2 = l2a.getIM();
    assertTrue(rt2.match(IntersectionMatrix.WithinsPattern));
View Full Code Here

    assertTrue(rt.match(IntersectionMatrix.DisjointPattern));

    // IntersectionMatrix rt2 = ComputeIm.getInstance().getIM(pg, pg3);
    Polygon_Polygon l2a = new Polygon_Polygon(pg3, pg);
    IntersectionMatrix rt2 = l2a.getIM();
    assertTrue(rt2.match(IntersectionMatrix.WithinsPattern));
  }

  @Test
  public void testGetIM2() {
    WktReader wkt = new WktReader();
View Full Code Here

    IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(
        pg, pg2).getIM();
    // Polygon_Polygon l2a1 = new Polygon_Polygon(pg, pg2);
    // IntersectionMatrix rt = l2a1.getIM();
    assertTrue(rt.match(IntersectionMatrix.WithinsPattern));

    IntersectionMatrix rt2 = ComputeImFactory.getInstance().getImComputer(
        pg3, pg2).getIM();
    // Polygon_Polygon l2a = new Polygon_Polygon(pg3, pg2);
    // IntersectionMatrix rt2 = l2a.getIM();
View Full Code Here

    IntersectionMatrix rt2 = ComputeImFactory.getInstance().getImComputer(
        pg3, pg2).getIM();
    // Polygon_Polygon l2a = new Polygon_Polygon(pg3, pg2);
    // IntersectionMatrix rt2 = l2a.getIM();
    assertTrue(rt2.match(IntersectionMatrix.WithinsPattern));
  }

  @Test
  public void testGetIM3() {
    WktReader wkt = new WktReader();
View Full Code Here

    // IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(
    // pg, pg2).getIM();
    LinearRing_LinearRing r2r = new LinearRing_LinearRing(pg.getShell(),
        pg2.getShell());
    IntersectionMatrix rt = r2r.getIM();
    assertTrue(!rt.match(IntersectionMatrix.DisjointPattern));
  }

  @Test
  public void testGetIM4() {
    WktReader wkt = new WktReader();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.