Ticket #13295: bbox_calculation.patch

File bbox_calculation.patch, 1.2 KB (added by GerdP, 10 years ago)
  • src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java

     
    2525import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2626import org.openstreetmap.josm.data.osm.QuadBuckets;
    2727import org.openstreetmap.josm.data.osm.Way;
     28import org.openstreetmap.josm.data.projection.Ellipsoid;
    2829import org.openstreetmap.josm.data.validation.Severity;
    2930import org.openstreetmap.josm.data.validation.Test;
    3031import org.openstreetmap.josm.data.validation.TestError;
     
    388389            // This needs to be a hash set because the searches
    389390            // overlap a bit and can return duplicate nodes.
    390391            nearbyNodeCache = null;
    391             List<LatLon> bounds = this.getBounds(dist);
     392            List<LatLon> bounds = this.getBounds(dist * (360.0d / (Ellipsoid.WGS84.a * 2 * Math.PI)));
    392393            List<Node> foundNodes = endnodesHighway.search(new BBox(bounds.get(0), bounds.get(1)));
    393394            foundNodes.addAll(endnodes.search(new BBox(bounds.get(0), bounds.get(1))));
    394395