+ }
+
+ if ($bDoInterpolation && $this->iMaxRank >= 30) {
+ $fDistance = $fSearchDiam;
+ if ($aPlace) {
+ // We can't reliably go from the closest street to an
+ // interpolation line because the closest interpolation
+ // may have a different street segments as a parent.
+ // Therefore allow an interpolation line to take precedence
+ // even when the street is closer.
+ $fDistance = $iRankAddress < 28 ? 0.001 : $aPlace['distance'];
+ }
+
+ $aHouse = $this->lookupInterpolation($sPointSQL, $fDistance);
+ Debug::printVar('Interpolation result', $aPlace);
+
+ if ($aHouse) {
+ $oResult = new Result($aHouse['place_id'], Result::TABLE_OSMLINE);
+ $iRndNum = max(0, round($aHouse['fhnr'] / $aHouse['step']) * $aHouse['step']);
+ $oResult->iHouseNumber = $aHouse['startnumber'] + $iRndNum;
+ if ($oResult->iHouseNumber > $aHouse['endnumber']) {
+ $oResult->iHouseNumber = $aHouse['endnumber'];
+ }
+ $aPlace = $aHouse;
+ }
+ }
+
+ if (!$aPlace) {