Exemplo n.º 1
0
 @Override
 public void visit(Way w) {
   if (e.child == null && left.matches(new Environment(w))) {
     if (e.osm instanceof Way
         && Geometry.PolygonIntersection.CROSSING.equals(
             Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))) {
       e.child = w;
     }
   }
 }
Exemplo n.º 2
0
 @Override
 public void visit(Way w) {
   if (e.child == null && left.matches(new Environment(w))) {
     if (e.osm instanceof Way
             && Geometry.PolygonIntersection.FIRST_INSIDE_SECOND.equals(
                 Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))
         || e.osm instanceof Relation
             && ((Relation) e.osm).isMultipolygon()
             && Geometry.isPolygonInsideMultiPolygon(w.getNodes(), (Relation) e.osm, null)) {
       e.child = w;
     }
   }
 }