X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/67b6f6350d783d2078274e26b07136b37ea20f46..4f86a91d6141b36a269967dc34ad65f4e8b1dfe5:/lib/lib.php diff --git a/lib/lib.php b/lib/lib.php index c6eadc6c..8a49761b 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -116,25 +116,6 @@ function getTokensFromSets($aSets) } -function gbPostcodeCalculate($sPostcode, $sPostcodeSector, $sPostcodeEnd, &$oDB) -{ - // Try an exact match on the gb_postcode table - $sSQL = 'select \'AA\', ST_X(ST_Centroid(geometry)) as lon,ST_Y(ST_Centroid(geometry)) as lat from gb_postcode where postcode = \''.$sPostcode.'\''; - $aNearPostcodes = chksql($oDB->getAll($sSQL)); - - if (sizeof($aNearPostcodes)) { - $aPostcodes = array(); - foreach ($aNearPostcodes as $aPostcode) { - $aPostcodes[] = array('lat' => $aPostcode['lat'], 'lon' => $aPostcode['lon'], 'radius' => 0.005); - } - - return $aPostcodes; - } - - return false; -} - - function getClassTypes() { return array( @@ -516,7 +497,7 @@ function _debugDumpGroupedSearches($aData, $aTokens) echo ""; echo ""; echo ""; - echo ""; + echo ""; echo ""; foreach ($aData as $iRank => $aRankedSet) { foreach ($aRankedSet as $aRow) { @@ -561,10 +542,15 @@ function _debugDumpGroupedSearches($aData, $aTokens) echo ""; echo ""; + echo ""; echo ""; - echo ""; - echo ""; + if ($aRow['oNear']) { + echo ""; + echo ""; + } else { + echo ""; + } echo ""; echo "";
rankName TokensName NotAddress TokensAddress Notcountryoperatorclasstypehouse#operatorclasstypepostcodehouse#LatLonRadius
".$aRow['sClass']."".$aRow['sType']."".$aRow['sPostcode']."".$aRow['sHouseNumber']."".$aRow['fLat']."".$aRow['fLon']."".$aRow['oNear']->lat()."".$aRow['oNear']->lon()."".$aRow['fRadius']."