mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 10:27:57 +00:00
Merge pull request #724 from lonvia/update-country-list
Update country grid SQL file and move it to nominatim.org
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -28,8 +28,7 @@ required for compiling osm2pgsql.
|
||||
|
||||
For running tests:
|
||||
|
||||
* [lettuce](http://lettuce.it)
|
||||
* [Shapely](http://toblerity.org/shapely/index.html)
|
||||
* [behave](http://pythonhosted.org/behave/)
|
||||
* [Psycopg2](http://initd.org/psycopg)
|
||||
* [nose](https://nose.readthedocs.io)
|
||||
* [phpunit](https://phpunit.de)
|
||||
|
||||
@@ -150,6 +150,13 @@ Get the source code from Github and change into the source directory
|
||||
|
||||
|
||||
|
||||
When installing the latest source from github, you also need to
|
||||
download the country grid:
|
||||
|
||||
|
||||
wget -O data/country_osm_grid.sql.gz http://www.nominatim.org/data/country_grid.sql.gz
|
||||
|
||||
|
||||
The code must be built in a separate directory. Create this directory,
|
||||
then configure and build Nominatim in there:
|
||||
|
||||
|
||||
@@ -137,6 +137,13 @@ Get the source code from Github and change into the source directory
|
||||
|
||||
|
||||
|
||||
When installing the latest source from github, you also need to
|
||||
download the country grid:
|
||||
|
||||
|
||||
wget -O data/country_osm_grid.sql.gz http://www.nominatim.org/data/country_grid.sql.gz
|
||||
|
||||
|
||||
The code must be built in a separate directory. Create this directory,
|
||||
then configure and build Nominatim in there:
|
||||
|
||||
|
||||
@@ -39,10 +39,11 @@ if (isset($_GET['debug']) && $_GET['debug']) @define('CONST_Debug', true);
|
||||
@define('CONST_HTTP_Proxy_Password', '');
|
||||
|
||||
// Paths
|
||||
@define('CONST_ExtraDataPath', CONST_BasePath.'/data');
|
||||
@define('CONST_Osm2pgsql_Binary', CONST_InstallPath.'/osm2pgsql/osm2pgsql');
|
||||
@define('CONST_Osmosis_Binary', '@OSMOSIS_PATH@');
|
||||
@define('CONST_Tiger_Data_Path', CONST_BasePath.'/data/tiger');
|
||||
@define('CONST_Wikipedia_Data_Path', CONST_BasePath.'/data');
|
||||
@define('CONST_Tiger_Data_Path', CONST_ExtraDataPath.'/tiger');
|
||||
@define('CONST_Wikipedia_Data_Path', CONST_ExtraDataPath);
|
||||
|
||||
// osm2pgsql settings
|
||||
@define('CONST_Osm2pgsql_Flatnode_File', null);
|
||||
|
||||
@@ -132,9 +132,15 @@ if ($aCMDResult['setup-db'] || $aCMDResult['all']) {
|
||||
pgsqlRunScript('ALTER FUNCTION ST_Distance_Spheroid(geometry, geometry, spheroid) RENAME TO ST_DistanceSpheroid');
|
||||
}
|
||||
|
||||
if (!file_exists(CONST_ExtraDataPath.'/country_osm_grid.sql.gz')) {
|
||||
echo "Error: you need to download the country_osm_grid first:";
|
||||
echo "\n wget -O ".CONST_ExtraDataPath."/country_osm_grid.sql.gz http://www.nominatim.org/data/country_grid.sql.gz\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
pgsqlRunScriptFile(CONST_BasePath.'/data/country_name.sql');
|
||||
pgsqlRunScriptFile(CONST_BasePath.'/data/country_naturalearthdata.sql');
|
||||
pgsqlRunScriptFile(CONST_BasePath.'/data/country_osm_grid.sql');
|
||||
pgsqlRunScriptFile(CONST_BasePath.'/data/country_osm_grid.sql.gz');
|
||||
pgsqlRunScriptFile(CONST_BasePath.'/data/gb_postcode_table.sql');
|
||||
if (file_exists(CONST_BasePath.'/data/gb_postcode_data.sql.gz')) {
|
||||
pgsqlRunScriptFile(CONST_BasePath.'/data/gb_postcode_data.sql.gz');
|
||||
|
||||
@@ -151,6 +151,13 @@ else #DOCS:
|
||||
cd $USERHOME #DOCS:
|
||||
fi #DOCS:
|
||||
|
||||
# When installing the latest source from github, you also need to
|
||||
# download the country grid:
|
||||
|
||||
if [ ! -f data/country_osm_grid.sql.gz ]; then #DOCS:
|
||||
wget -O data/country_osm_grid.sql.gz http://www.nominatim.org/data/country_grid.sql.gz
|
||||
fi #DOCS:
|
||||
|
||||
# The code must be built in a separate directory. Create this directory,
|
||||
# then configure and build Nominatim in there:
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ EOFAPACHECONF
|
||||
sudo a2enconf nominatim
|
||||
sudo service apache2 restart
|
||||
|
||||
wget -O data/country_osm_grid.sql.gz http://www.nominatim.org/data/country_grid.sql.gz
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
@@ -57,4 +58,5 @@ tee settings/local.php << EOF
|
||||
@define('CONST_Website_BaseURL', '/nominatim/');
|
||||
@define('CONST_Database_DSN', 'pgsql://@/test_api_nominatim');
|
||||
@define('CONST_Wikipedia_Data_Path', CONST_BasePath.'/test/testdb');
|
||||
EOF
|
||||
EOF
|
||||
|
||||
|
||||
@@ -138,6 +138,13 @@ else #DOCS:
|
||||
cd $USERHOME #DOCS:
|
||||
fi #DOCS:
|
||||
|
||||
# When installing the latest source from github, you also need to
|
||||
# download the country grid:
|
||||
|
||||
if [ ! -f data/country_osm_grid.sql.gz ]; then #DOCS:
|
||||
wget -O data/country_osm_grid.sql.gz http://www.nominatim.org/data/country_grid.sql.gz
|
||||
fi #DOCS:
|
||||
|
||||
# The code must be built in a separate directory. Create this directory,
|
||||
# then configure and build Nominatim in there:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user