Ticket #13251: improve_polygon_intersection_test.patch
File improve_polygon_intersection_test.patch, 870 bytes (added by , 5 years ago) |
---|
-
core/src/org/openstreetmap/josm/tools/Geometry.java
563 563 564 564 if (inter.isEmpty() || bounds.getHeight()*bounds.getWidth() <= eps) { 565 565 return PolygonIntersection.OUTSIDE; 566 } else if ( inter.equals(a1)) {566 } else if (a2.getBounds2D().contains(a1.getBounds2D()) && inter.equals(a1)) { 567 567 return PolygonIntersection.FIRST_INSIDE_SECOND; 568 } else if ( inter.equals(a2)) {568 } else if (a1.getBounds2D().contains(a2.getBounds2D()) && inter.equals(a2)) { 569 569 return PolygonIntersection.SECOND_INSIDE_FIRST; 570 570 } else { 571 571 return PolygonIntersection.CROSSING;