Changeset 10684 in josm


Ignore:
Timestamp:
2016-07-31T12:36:17+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13251 - Improve multipolygon validator performance (patch by gpetermann_muenchen)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r10662 r10684  
    564564        if (inter.isEmpty() || bounds.getHeight()*bounds.getWidth() <= eps) {
    565565            return PolygonIntersection.OUTSIDE;
    566         } else if (inter.equals(a1)) {
     566        } else if (a2.getBounds2D().contains(a1.getBounds2D()) && inter.equals(a1)) {
    567567            return PolygonIntersection.FIRST_INSIDE_SECOND;
    568         } else if (inter.equals(a2)) {
     568        } else if (a1.getBounds2D().contains(a2.getBounds2D()) && inter.equals(a2)) {
    569569            return PolygonIntersection.SECOND_INSIDE_FIRST;
    570570        } else {
Note: See TracChangeset for help on using the changeset viewer.