mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
rewrite address interpolation so that planet_osm_node is not needed
This allows address interpolations to work correctly when flatnode storage
is used for node coordinates.
To fix interpolations in an existing database, follow these steps:
* invalidate all interpolations (in psql):
`UPDATE placex SET indexed_status=2 WHERE rank_search = 28`
* disable updates:
./utils/setup.php --create-functions --create-partition-functions
* reindex the whole lot:
./utils/update.php --index --index-instances <number of your cpus>
* enable updates again:
./utils/setup.php --create-functions --enable-diff-updates --create-partition-functions
This commit is contained in:
@@ -89,6 +89,8 @@
|
||||
$aDSNInfo = DB::parseDSN(CONST_Database_DSN);
|
||||
if (!isset($aDSNInfo['port']) || !$aDSNInfo['port']) $aDSNInfo['port'] = 5432;
|
||||
|
||||
$fPostgisVersion = (float) CONST_Postgis_Version;
|
||||
|
||||
if ($aCMDResult['create-db'] || $aCMDResult['all'])
|
||||
{
|
||||
echo "Create DB\n";
|
||||
@@ -126,7 +128,6 @@
|
||||
pgsqlRunScript('CREATE EXTENSION hstore');
|
||||
}
|
||||
|
||||
$fPostgisVersion = (float) CONST_Postgis_Version;
|
||||
if ($fPostgisVersion < 2.0) {
|
||||
pgsqlRunScriptFile(CONST_Path_Postgresql_Postgis.'/postgis.sql');
|
||||
pgsqlRunScriptFile(CONST_Path_Postgresql_Postgis.'/spatial_ref_sys.sql');
|
||||
@@ -215,6 +216,14 @@
|
||||
if ($aCMDResult['enable-debug-statements']) $sTemplate = str_replace('--DEBUG:', '', $sTemplate);
|
||||
if (CONST_Limit_Reindexing) $sTemplate = str_replace('--LIMIT INDEXING:', '', $sTemplate);
|
||||
pgsqlRunScript($sTemplate);
|
||||
if ($fPostgisVersion < 2.0) {
|
||||
echo "Helper functions for postgis < 2.0\n";
|
||||
$sTemplate = file_get_contents(CONST_BasePath.'/sql/postgis_15_aux.sql');
|
||||
} else {
|
||||
echo "Helper functions for postgis >= 2.0\n";
|
||||
$sTemplate = file_get_contents(CONST_BasePath.'/sql/postgis_20_aux.sql');
|
||||
}
|
||||
pgsqlRunScript($sTemplate);
|
||||
}
|
||||
|
||||
if ($aCMDResult['create-minimal-tables'])
|
||||
|
||||
Reference in New Issue
Block a user