From: Sarah Hoffmann Date: Tue, 14 Jun 2016 19:38:03 +0000 (+0200) Subject: reverse do not downgrade tiger and interpolation results X-Git-Tag: v3.0.0~158 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/2ab43f6367518f0e63a770fcae202e016c3f09aa?ds=sidebyside reverse do not downgrade tiger and interpolation results Also fix the type that is returned for Tiger data. Fixes #470 --- diff --git a/lib/ReverseGeocode.php b/lib/ReverseGeocode.php index 4eeb5cc4..d2902a59 100644 --- a/lib/ReverseGeocode.php +++ b/lib/ReverseGeocode.php @@ -203,6 +203,7 @@ $iPlaceID = $aPlaceLine['place_id']; $iParentPlaceID = $aPlaceLine['parent_place_id']; // the street $fFraction = $aPlaceLine['fraction']; + $iMaxRank = 30; } // else: nothing to do, take placex house from above } @@ -213,6 +214,7 @@ $iPlaceID = $aPlaceLine['place_id']; $iParentPlaceID = $aPlaceLine['parent_place_id']; // the street $fFraction = $aPlaceLine['fraction']; + $iMaxRank = 30; } } } @@ -249,6 +251,7 @@ $iPlaceID = $aPlaceTiger['place_id']; $iParentPlaceID = $aPlaceTiger['parent_place_id']; // the street $fFraction = $aPlaceTiger['fraction']; + $iMaxRank = 30; } } @@ -272,7 +275,7 @@ } } return array('place_id' => $iPlaceID, - 'type' => $bPlaceIsTiger ? 'tiger' : $bPlaceIsLine ? 'interpolation' : 'osm', + 'type' => $bPlaceIsTiger ? 'tiger' : ($bPlaceIsLine ? 'interpolation' : 'osm'), 'fraction' => ($bPlaceIsTiger || $bPlaceIsLine) ? $fFraction : -1); }