Package chunmap.model.relate

Examples of chunmap.model.relate.IntersectionMatrix


    Geometry g2 = wkt.read("LINESTRING(1 1,1 2,2 2,3 2)");
    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));

  }
View Full Code Here


        .read("LINESTRING(1.0 0.5,3.0 0.5,3.5 0.0,3.0 -1.0,1.0 0.0,1.0 0.5)");
    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));

  }
View Full Code Here

        .read("LINESTRING(1.0 2.0,3.0 1.0,4.0 0.0,3.0 -2.0,0.0 0.0,1.0 2.0)");
    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));

  }
View Full Code Here

        .read("LINESTRING(4.0 0.5,6.0 0.5,6.5 0.0,6.0 -1.0,4.0 0.0,4.0 0.5)");
    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.get(IntersectionMatrix.Inner, IntersectionMatrix.Inner) == IntersectionMatrix.EmptyDim);

  }
View Full Code Here

    LineString ls = (LineString) g;
    Polygon pg = (Polygon) g2;

    // IntersectionMatrix rt = ComputeIm.getInstance().getIM(ls, pg);
    LineString_Polygon l2a = new LineString_Polygon(ls, pg);
    IntersectionMatrix rt = l2a.getIM();
    assertTrue(rt.get(IntersectionMatrix.Inner, IntersectionMatrix.Inner) != IntersectionMatrix.EmptyDim);

  }
View Full Code Here

        .read("POLYGON((-2.639991350383829 -1.7999950537374092,-1.8399918576928131 -1.7999950537374092,-1.8399918576928131 -0.9999955610463935,-2.639991350383829 -0.9999955610463935,-2.639991350383829 -1.7999950537374092))");
    LineString ls = (LineString) g;
    Polygon pg = (Polygon) g2;

    LineString_LinearRing l2a = new LineString_LinearRing(ls, pg.getShell());
    IntersectionMatrix rt = l2a.getIM();
    assertTrue(rt.get(IntersectionMatrix.Inner, IntersectionMatrix.Inner) != IntersectionMatrix.EmptyDim);

  }
View Full Code Here

    LineString ls = (LineString) g;
    Polygon pg = (Polygon) g2;

    // IntersectionMatrix rt = ComputeIm.getInstance().getIM(ls, pg);
    LineString_LinearRing l2a = new LineString_LinearRing(ls, pg.getShell());
    IntersectionMatrix rt = l2a.getIM();
    assertTrue(rt.get(IntersectionMatrix.Inner, IntersectionMatrix.Inner) != IntersectionMatrix.EmptyDim);

  }
View Full Code Here

  protected void computeIM() {
    GeometryCollection c1 = (GeometryCollection) g1;
    GeometryCollection c2 = (GeometryCollection) g2;
    for (Geometry ge1 : c1) {
      for (Geometry ge2 : c2) {
        IntersectionMatrix tim = ComputeImFactory.getInstance()
            .getImComputer(ge1, ge2).getIM();
        im.unite(tim);
      }
    }
  }
View Full Code Here

      Fragment fra = new Fragment();
      fra.setLineString(ls);

      ComputeIm cim = ComputeImFactory.getInstance().getImComputer(ls,
          other);
      IntersectionMatrix im = cim.getIM();
      boolean isWithin = isWithin(im);
      boolean isBorder = isOnBorder(im);

      if (isBorder) {
        fra.setContainIn(Fragment.Border);
View Full Code Here

    Geometry g = wkt.read("LINESTRING(1 2,3 1,4 0,3 -2,0 0,1 2)");
    Ring lr = ((LineString) g).toLinearRing();
    GeoPoint p1 = new GeoPoint(1, 0);

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

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

TOP

Related Classes of chunmap.model.relate.IntersectionMatrix

Copyright © 2018 www.massapicom. 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.