Changeset 13721 in josm for trunk


Ignore:
Timestamp:
2018-05-08T21:54:48+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #16264, see #16188, see #16189 - reduce validator false positives:

  • increase tolerance of buildings with almost right angle to 1 degree
  • detect crossing residential areas only with themselves and buildings
  • fix crossing railways messages
Location:
trunk/src/org/openstreetmap/josm/data/validation/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java

    r13678 r13721  
    4242     */
    4343    private enum WayType {
    44         BUILDING, HIGHWAY, RESIDENTIAL_AREA, WATERWAY, WAY;
     44        BUILDING, HIGHWAY, RAILWAY, RESIDENTIAL_AREA, WATERWAY, WAY;
    4545
    4646        static WayType of(Way w) {
     
    4949            else if (w.hasKey(CrossingWays.HIGHWAY))
    5050                return HIGHWAY;
     51            else if (isRailway(w))
     52                return RAILWAY;
    5153            else if (isResidentialArea(w))
    5254                return RESIDENTIAL_AREA;
     
    101103                return true;
    102104            }
    103             if ((w1.hasKey(HIGHWAY) && isResidentialArea(w2))
    104              || (w2.hasKey(HIGHWAY) && isResidentialArea(w1)))
     105            if ((w1.hasKey(HIGHWAY, RAILWAY, WATERWAY) && isResidentialArea(w2))
     106             || (w2.hasKey(HIGHWAY, RAILWAY, WATERWAY) && isResidentialArea(w1)))
    105107                return true;
    106108            if (isSubwayOrTramOrRazed(w2)) {
     
    128130                    case HIGHWAY:
    129131                        return tr("Crossing highways");
     132                    case RAILWAY:
     133                        return tr("Crossing railways");
    130134                    case RESIDENTIAL_AREA:
    131135                        return tr("Crossing residential areas");
     
    142146                            case HIGHWAY:
    143147                                return tr("Crossing building/highway");
     148                            case RAILWAY:
     149                                return tr("Crossing building/railway");
    144150                            case RESIDENTIAL_AREA:
    145151                                return tr("Crossing building/residential area");
     
    152158                    case HIGHWAY:
    153159                        switch (types[1]) {
    154                             case RESIDENTIAL_AREA:
    155                                 return tr("Crossing highway/residential area");
     160                            case RAILWAY:
     161                                return tr("Crossing highway/railway");
    156162                            case WATERWAY:
    157163                                return tr("Crossing highway/waterway");
     
    160166                                return tr("Crossing highway/way");
    161167                        }
     168                    case RAILWAY:
     169                        switch (types[1]) {
     170                            case WATERWAY:
     171                                return tr("Crossing railway/waterway");
     172                            case WAY:
     173                            default:
     174                                return tr("Crossing railway/way");
     175                        }
    162176                    case RESIDENTIAL_AREA:
    163177                        switch (types[1]) {
    164                             case WATERWAY:
    165                                 return tr("Crossing residential area/waterway");
    166178                            case WAY:
    167179                            default:
  • trunk/src/org/openstreetmap/josm/data/validation/tests/RightAngleBuildingTest.java

    r13712 r13721  
    7070        super.startTest(monitor);
    7171        maxAngleDelta = Config.getPref().getDouble("validator.RightAngleBuilding.maximumDelta", 10.0);
    72         minAngleDelta = Config.getPref().getDouble("validator.RightAngleBuilding.minimumDelta", 0.25);
     72        minAngleDelta = Config.getPref().getDouble("validator.RightAngleBuilding.minimumDelta", 1.0);
    7373    }
    7474
Note: See TracChangeset for help on using the changeset viewer.