From: Sarah Hoffmann Date: Sat, 16 Sep 2017 13:54:55 +0000 (+0200) Subject: Merge pull request #782 from lonvia/rework-postcodes X-Git-Tag: v3.1.0~88 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/909b0c7462b336d07cab4499529957a4096a8c18?hp=88610b1b7470bab17e41429d6ad24fec8c4b45c6 Merge pull request #782 from lonvia/rework-postcodes Rework handling of artificial postcode centroids --- diff --git a/README.md b/README.md index 5059473c..42c4d72c 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,13 @@ http://wiki.openstreetmap.org/wiki/Nominatim Installation ============ -There are detailed installation instructions in the /docs directory. -Here is a quick summary of the necessary steps. +The latest stable release can be downloaded from http://nominatim.org. +There you can also find [installation instructions for the release](http://nominatim.org/release-docs/latest/Installation). + +Detailed installation instructions for the development version can be +found in the `/docs` directory, see [docs/Installation.md](docs/Installation.md). + +A quick summary of the necessary steps: 1. Compile Nominatim: @@ -31,21 +36,13 @@ Here is a quick summary of the necessary steps. cmake .. make - For more detailed installation instructions see [docs/Installation.md](docs/Installation.md). - There are also step-by-step instructions for - [Ubuntu 16.04](docs/Install-on-Ubuntu-16.md) and - [CentOS 7.2](docs/Install-on-Centos-7.md). - 2. Get OSM data and import: ./build/utils/setup.php --osm-file --all - Details can be found in [docs/Import_and_update.md](docs/Import-and-Update.md) - 3. Point your webserver to the ./build/website directory. - License ======= diff --git a/sql/functions.sql b/sql/functions.sql index 3c64cf15..a9bca542 100644 --- a/sql/functions.sql +++ b/sql/functions.sql @@ -915,6 +915,9 @@ BEGIN ELSE NEW.rank_address := 0; END IF; + ELSEIF NEW.class = 'leisure' and NEW.type in ('park') THEN + NEW.rank_search := 24; + NEW.rank_address := 0; ELSEIF NEW.class = 'natural' and NEW.type in ('peak','volcano','mountain_range') THEN NEW.rank_search := 18; NEW.rank_address := 0; diff --git a/utils/update.php b/utils/update.php index d8611715..3cc9cdd6 100755 --- a/utils/update.php +++ b/utils/update.php @@ -59,6 +59,13 @@ if (!is_null(CONST_Osm2pgsql_Flatnode_File)) { } if ($aResult['init-updates']) { + // sanity check that the replication URL is correct + $sBaseState = file_get_contents(CONST_Replication_Url.'/state.txt'); + if ($sBaseState === false) { + echo "\nCannot find state.txt file at the configured replication URL.\n"; + echo "Does the URL point to a directory containing OSM update data?\n\n"; + fail("replication URL not reachable."); + } $sSetup = CONST_InstallPath.'/utils/setup.php'; $iRet = -1; passthru($sSetup.' --create-functions --enable-diff-updates', $iRet); @@ -75,9 +82,9 @@ if ($aResult['init-updates']) { // get the appropriate state id $aOutput = 0; - exec(CONST_Pyosmium_Binary.' -D '.$sWindBack.' --server '.CONST_Replication_Url, - $aOutput, $iRet); - if ($iRet != 0) { + $sCmd = CONST_Pyosmium_Binary.' -D '.$sWindBack.' --server '.CONST_Replication_Url; + exec($sCmd, $aOutput, $iRet); + if ($iRet != 0 || $aOutput[0] == 'None') { fail('Error running pyosmium tools'); }