reverse do not downgrade tiger and interpolation results

Also fix the type that is returned for Tiger data.

Fixes #470
This commit is contained in:
Sarah Hoffmann
2016-06-14 21:38:03 +02:00
parent b14bc75dc4
commit 2ab43f6367

View File

@@ -203,6 +203,7 @@
$iPlaceID = $aPlaceLine['place_id']; $iPlaceID = $aPlaceLine['place_id'];
$iParentPlaceID = $aPlaceLine['parent_place_id']; // the street $iParentPlaceID = $aPlaceLine['parent_place_id']; // the street
$fFraction = $aPlaceLine['fraction']; $fFraction = $aPlaceLine['fraction'];
$iMaxRank = 30;
} }
// else: nothing to do, take placex house from above // else: nothing to do, take placex house from above
} }
@@ -213,6 +214,7 @@
$iPlaceID = $aPlaceLine['place_id']; $iPlaceID = $aPlaceLine['place_id'];
$iParentPlaceID = $aPlaceLine['parent_place_id']; // the street $iParentPlaceID = $aPlaceLine['parent_place_id']; // the street
$fFraction = $aPlaceLine['fraction']; $fFraction = $aPlaceLine['fraction'];
$iMaxRank = 30;
} }
} }
} }
@@ -249,6 +251,7 @@
$iPlaceID = $aPlaceTiger['place_id']; $iPlaceID = $aPlaceTiger['place_id'];
$iParentPlaceID = $aPlaceTiger['parent_place_id']; // the street $iParentPlaceID = $aPlaceTiger['parent_place_id']; // the street
$fFraction = $aPlaceTiger['fraction']; $fFraction = $aPlaceTiger['fraction'];
$iMaxRank = 30;
} }
} }
@@ -272,7 +275,7 @@
} }
} }
return array('place_id' => $iPlaceID, return array('place_id' => $iPlaceID,
'type' => $bPlaceIsTiger ? 'tiger' : $bPlaceIsLine ? 'interpolation' : 'osm', 'type' => $bPlaceIsTiger ? 'tiger' : ($bPlaceIsLine ? 'interpolation' : 'osm'),
'fraction' => ($bPlaceIsTiger || $bPlaceIsLine) ? $fFraction : -1); 'fraction' => ($bPlaceIsTiger || $bPlaceIsLine) ? $fFraction : -1);
} }