remove base country grid from repo

The updated country grid is significantly larger, so expect it to
be downloaded from the nominatim.org website instead.
This commit is contained in:
Sarah Hoffmann 2017-05-12 23:02:50 +02:00
parent d8ade1c527
commit b15b996cc4
3 changed files with 10 additions and 25527 deletions

File diff suppressed because one or more lines are too long

View File

@ -39,10 +39,11 @@ if (isset($_GET['debug']) && $_GET['debug']) @define('CONST_Debug', true);
@define('CONST_HTTP_Proxy_Password', ''); @define('CONST_HTTP_Proxy_Password', '');
// Paths // Paths
@define('CONST_ExtraDataPath', CONST_BasePath.'/data');
@define('CONST_Osm2pgsql_Binary', CONST_InstallPath.'/osm2pgsql/osm2pgsql'); @define('CONST_Osm2pgsql_Binary', CONST_InstallPath.'/osm2pgsql/osm2pgsql');
@define('CONST_Osmosis_Binary', '@OSMOSIS_PATH@'); @define('CONST_Osmosis_Binary', '@OSMOSIS_PATH@');
@define('CONST_Tiger_Data_Path', CONST_BasePath.'/data/tiger'); @define('CONST_Tiger_Data_Path', CONST_ExtraDataPath.'/tiger');
@define('CONST_Wikipedia_Data_Path', CONST_BasePath.'/data'); @define('CONST_Wikipedia_Data_Path', CONST_ExtraDataPath);
// osm2pgsql settings // osm2pgsql settings
@define('CONST_Osm2pgsql_Flatnode_File', null); @define('CONST_Osm2pgsql_Flatnode_File', null);

View File

@ -132,9 +132,15 @@ if ($aCMDResult['setup-db'] || $aCMDResult['all']) {
pgsqlRunScript('ALTER FUNCTION ST_Distance_Spheroid(geometry, geometry, spheroid) RENAME TO ST_DistanceSpheroid'); 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_name.sql');
pgsqlRunScriptFile(CONST_BasePath.'/data/country_naturalearthdata.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'); pgsqlRunScriptFile(CONST_BasePath.'/data/gb_postcode_table.sql');
if (file_exists(CONST_BasePath.'/data/gb_postcode_data.sql.gz')) { if (file_exists(CONST_BasePath.'/data/gb_postcode_data.sql.gz')) {
pgsqlRunScriptFile(CONST_BasePath.'/data/gb_postcode_data.sql.gz'); pgsqlRunScriptFile(CONST_BasePath.'/data/gb_postcode_data.sql.gz');