--- dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/BoundingBox.java 2014/09/11 20:44:20 2211 +++ dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/BoundingBox.java 2014/12/10 08:26:12 2240 @@ -27,18 +27,22 @@ } public void validateBbox() throws BoundingBoxException { - - if ( Math.abs(latitudeMax-latitudeMin)> 1.0) - throw new BoundingBoxException("For stor latitude forskel"); - if ( Math.abs(longitudeMax-longitudeMin)> 1.0) - throw new BoundingBoxException("For stor longitude forskel"); + double latDiff = Math.abs(latitudeMax - latitudeMin); + if ( latDiff > 1.0) { + throw new BoundingBoxException("For stor latitude forskel / " + latDiff); + } + + double lngDiff = Math.abs(longitudeMax - longitudeMin); + if ( lngDiff > 1.0) { + throw new BoundingBoxException("For stor longitude forskel / " + lngDiff); + } GeoPoint min = new GeoPoint(latitudeMin, longitudeMin); GeoPoint max = new GeoPoint(latitudeMax, longitudeMax); double afstand = GeoPoint.beregnAfstand(min, max); - if (afstand >= 90.0) { //hvis cross størrelsen er over 90 km - så er postnummeret for stort + if (afstand >= 125.0) { //hvis cross afstand er over 80 km - så er postnummeret for stort throw new BoundingBoxException("For stor cross afstand " + afstand); } }