From: Sarah Hoffmann Date: Tue, 14 Jan 2020 20:34:35 +0000 (+0100) Subject: Merge pull request #1638 from mtmail/check-for-invalid-indices X-Git-Tag: v3.5.0~100 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/586ff0c3648b530597c29ee3e555432e514883d1?hp=f3ba358d50ac909042dee20f409c7508bde3ab39 Merge pull request #1638 from mtmail/check-for-invalid-indices check_import_finished: check for invalid indices --- diff --git a/lib/template/includes/html-top-navigation.php b/lib/template/includes/html-top-navigation.php index 41b638ab..0047e59c 100644 --- a/lib/template/includes/html-top-navigation.php +++ b/lib/template/includes/html-top-navigation.php @@ -21,8 +21,10 @@ About & Help diff --git a/lib/template/includes/introduction.php b/lib/template/includes/introduction.php index c8b82f33..f891c785 100644 --- a/lib/template/includes/introduction.php +++ b/lib/template/includes/introduction.php @@ -6,4 +6,4 @@ look up data by its geographic coordinate (reverse search). Each result comes wi link to a details page where you can inspect what data about the object is saved in the database and investigate how the address of the object has been computed.

-For more information visit the Nominatim wiki page. +For more information visit the Nominatim home page. diff --git a/lib/template/includes/report-errors.php b/lib/template/includes/report-errors.php index 05a47c8b..c5dc1e7f 100644 --- a/lib/template/includes/report-errors.php +++ b/lib/template/includes/report-errors.php @@ -1,24 +1,42 @@

- Before reporting problems please read the user documentation - and - FAQ. + Before reporting problems please read the user documentation. + +

Finding the expected result

+ + First of all, please make sure that the result that you expect is + available in the OpenStreetMap data. + + To find the OpenStreetMap data, do the following: + + + + If you cannot find the data you are looking for, there is a good chance + that it has not been entered yet. You should report or fix the problem in OpenStreetMap directly. + +

Reporting bad searches

+ + Problems may be reported at the issue tracker on github. Please read through + the open tickets first and check if your problem has not already been + reported. + + When reporting a problem, include the following: + + + + For general questions about installing and searching in Nominatim, please + use Help OpenStreetMap. - If your problem relates to the address of a particular search result please use the 'details' link - to check how the address was generated before reporting a problem. -

-

- Use Nominatim issues on github - to report problems. - -

-

- Please ensure that you include a full description of the problem, including the search - query that you used, the problem with the result and, if the problem relates to missing data, - the osm type (node, way, relation) and id of the item that is missing. -

-

- Problems that contain enough detail are likely to get looked at before ones that require - significant research.

diff --git a/utils/warm.php b/utils/warm.php index 8ba746a2..5476eae0 100644 --- a/utils/warm.php +++ b/utils/warm.php @@ -23,6 +23,19 @@ $oDB->connect(); $bVerbose = $aResult['verbose']; +function print_results($aResults, $bVerbose) +{ + if ($bVerbose) { + if ($aResults && count($aResults)) { + echo $aResults[0]['langaddress']."\n"; + } else { + echo "\n"; + } + } else { + echo '.'; + } +} + if (!$aResult['search-only']) { $oReverseGeocode = new Nominatim\ReverseGeocode($oDB); $oReverseGeocode->setZoom(20); @@ -36,13 +49,10 @@ if (!$aResult['search-only']) { $fLat = rand(-9000, 9000) / 100; $fLon = rand(-18000, 18000) / 100; if ($bVerbose) echo "$fLat, $fLon = "; + $oLookup = $oReverseGeocode->lookup($fLat, $fLon); - if ($oLookup) { - $aDetails = $oPlaceLookup->lookup(array($oLookup->iId => $oLookup)); - if ($bVerbose) echo $aDetails['langaddress']."\n"; - } else { - echo '.'; - } + $aSearchResults = $oLookup ? $oPlaceLookup->lookup(array($oLookup->iId => $oLookup)) : null; + print_results($aSearchResults, $bVerbose); } echo "\n"; } @@ -52,13 +62,14 @@ if (!$aResult['reverse-only']) { echo 'Warm search: '; if ($bVerbose) echo "\n"; - $sSQL = 'select word from word where word is not null order by search_name_count desc limit 1000'; + $sSQL = 'SELECT word FROM word WHERE word is not null ORDER BY search_name_count DESC LIMIT 1000'; foreach ($oDB->getCol($sSQL) as $sWord) { if ($bVerbose) echo "$sWord = "; + $oGeocode->setLanguagePreference(array('en')); $oGeocode->setQuery($sWord); $aSearchResults = $oGeocode->lookup(); - if ($bVerbose) echo $aSearchResults[0]['langaddress']."\n"; - else echo '.'; + print_results($aSearchResults, $bVerbose); } + echo "\n"; }