]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/update.php
block heavy users without user agent
[nominatim.git] / utils / update.php
index e8972f1d26f4d3cefa962667459966d38f548050..f82696c215c6217d17237d05383158433c91bdd4 100755 (executable)
                {
                        // Import the file
                        $sCMD = CONST_Osm2pgsql_Binary.' -klas -C 2000 -O gazetteer -d '.$aDSNInfo['database'].' '.$sNextFile;
+                       if (!is_null(CONST_Osm2pgsql_Flatnode_File))
+                       {
+                               $sCMD .= ' --flat-nodes '.CONST_Osm2pgsql_Flatnode_File;
+                       }
                        echo $sCMD."\n";
                        exec($sCMD, $sJunk, $iErrorLevel);
 
 
                // import generated change file
                $sCMD = CONST_Osm2pgsql_Binary.' -klas -C 2000 -O gazetteer -d '.$aDSNInfo['database'].' '.$sTemporaryFile;
+               if (!is_null(CONST_Osm2pgsql_Flatnode_File))
+               {
+                       $sCMD .= ' --flat-nodes '.CONST_Osm2pgsql_Flatnode_File;
+               }
                echo $sCMD."\n";
                exec($sCMD, $sJunk, $iErrorLevel);
                if ($iErrorLevel)
                $sCMDDownload = $sOsmosisCMD.' --read-replication-interval workingDirectory='.$sOsmosisConfigDirectory.' --simplify-change --write-xml-change '.$sImportFile;
                $sCMDCheckReplicationLag = $sOsmosisCMD.' -q --read-replication-lag workingDirectory='.$sOsmosisConfigDirectory;
                $sCMDImport = CONST_Osm2pgsql_Binary.' -klas -C 2000 -O gazetteer -d '.$aDSNInfo['database'].' '.$sImportFile;
+               if (!is_null(CONST_Osm2pgsql_Flatnode_File))
+               {
+                       $sCMDImport .= ' --flat-nodes '.CONST_Osm2pgsql_Flatnode_File;
+               }
                $sCMDIndex = $sBasePath.'/nominatim/nominatim -i -d '.$aDSNInfo['database'];
                if (!$aResult['no-npi']) {
                        $sCMDIndex .= '-F ';