]> git.openstreetmap.org Git - nominatim.git/commitdiff
make Tiger data path configurable
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 8 May 2015 17:48:27 +0000 (19:48 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 8 May 2015 17:48:27 +0000 (19:48 +0200)
settings/settings.php
utils/imports.php
utils/setup.php

index 75b9ac237ea9ee8a3eed4f2a468d8e72e81c3909..1d91b61c1907ca56f1e47af3c47f42e0755a1fa6 100644 (file)
@@ -18,6 +18,7 @@
        @define('CONST_Path_Postgresql_Postgis', CONST_Path_Postgresql_Contrib.'/postgis-'.CONST_Postgis_Version);
        @define('CONST_Osm2pgsql_Binary', CONST_BasePath.'/osm2pgsql/osm2pgsql');
        @define('CONST_Osmosis_Binary', '/usr/bin/osmosis');
+       @define('CONST_Tiger_Data_Path', CONST_BasePath.'/data/tiger');
 
        // osm2pgsql settings
        @define('CONST_Osm2pgsql_Flatnode_File', null);
index 332e5b3131d04479f989e0f354cac303ec5461ee..70a24963fa57f2f5338174dfe890965f12fb0057 100755 (executable)
@@ -3,7 +3,6 @@
 
        require_once(dirname(dirname(__FILE__)).'/lib/init-cmd.php');
        ini_set('memory_limit', '800M');
-       $sDefaultDataPath = CONST_BasePath.'/data/tiger2014';
 
        $aCMDOptions = array(
                "Create and setup nominatim search system",
@@ -18,7 +17,7 @@
 
        if (isset($aCMDResult['parse-tiger']))
        {
-               if (!file_exists($sDefaultDataPath)) mkdir($sDefaultDataPath);
+               if (!file_exists(CONST_Tiger_Data_Path)) mkdir(CONST_Tiger_Data_Path);
 
                $sTempDir = tempnam('/tmp', 'tiger');
                unlink($sTempDir);
@@ -48,7 +47,7 @@
                                }
                                else
                                {
-                                       copy($sOsmFile, $sDefaultDataPath.'/'.$sCountyID.'.sql');
+                                       copy($sOsmFile, CONST_Tiger_Data_Path.'/'.$sCountyID.'.sql');
                                }
                        }
                        // Cleanup
index 3c038e66d66f2f2e3f1ac2849a9ea32e108088f1..b49813a8ab7f056603e469b8fd8e7fcdfd2c1258 100755 (executable)
                        $aDBInstances[$i] =& getDB(true);
                }
 
-               foreach(glob(CONST_BasePath.'/data/tiger2014/*.sql') as $sFile)
+               foreach(glob(CONST_Tiger_Data_Path.'/*.sql') as $sFile)
                {
                        echo $sFile.': ';
                        $hFile = fopen($sFile, "r");