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";
+ echo "\n wget -O ".CONST_ExtraDataPath."/country_osm_grid.sql.gz https://www.nominatim.org/data/country_grid.sql.gz\n";
exit(1);
}
$sSQL .= ' FROM us_postcode WHERE postcode NOT IN';
$sSQL .= ' (SELECT postcode FROM location_postcode';
$sSQL .= " WHERE country_code = 'us')";
- } else {
- $sSQL .= 'TRUNCATE TABLE us_postcode';
+ if (!pg_query($oDB->connection, $sSQL)) fail(pg_last_error($oDB->connection));
}
- if (!pg_query($oDB->connection, $sSQL)) fail(pg_last_error($oDB->connection));
// add missing postcodes for GB (if available)
$sSQL = 'INSERT INTO location_postcode';
'import_polygon_*',
'import_status',
'place_addressline',
+ 'location_postcode',
'location_property*',
'placex',
'search_name',
'word',
'query_log',
'new_query_log',
- 'gb_postcode',
'spatial_ref_sys',
'country_name',
'place_classtype_*'