clean up intermediate tables earlier with --drop

When --drop is given, we can remove all node geometry information
already after the import with osm2pgsql. Also drop all unnecessary
tables before creating the final indices.
This commit is contained in:
Sarah Hoffmann
2020-02-12 11:03:20 +01:00
parent 97b892fac2
commit b9171dd10b
4 changed files with 30 additions and 12 deletions

View File

@@ -138,6 +138,11 @@ if ($aCMDResult['index'] || $aCMDResult['all']) {
$oSetup->index($aCMDResult['index-noanalyse']);
}
if ($aCMDResult['drop']) {
$bDidSomething = true;
$oSetup->drop($aCMDResult);
}
if ($aCMDResult['create-search-indices'] || $aCMDResult['all']) {
$bDidSomething = true;
$oSetup->createSearchIndices();
@@ -148,11 +153,6 @@ if ($aCMDResult['create-country-names'] || $aCMDResult['all']) {
$oSetup->createCountryNames($aCMDResult);
}
if ($aCMDResult['drop']) {
$bDidSomething = true;
$oSetup->drop($aCMDResult);
}
// ******************************************************
// If we did something, repeat the warnings
if (!$bDidSomething) {