]> git.openstreetmap.org Git - nominatim.git/blobdiff - tests/steps/osm2pgsql_setup.py
Merge remote-tracking branch 'lonvia/inverse-query-II'
[nominatim.git] / tests / steps / osm2pgsql_setup.py
index 40a6b39e7587752d535b881fb15935f9ac4f2ba0..e5198d9df97736d3a3685a2fd365cd7f3e2d8516 100644 (file)
@@ -108,7 +108,7 @@ def _sort_xml_entries(x, y):
 
 def write_osm_obj(fd, obj):
     if obj['type'] == 'N':
 
 def write_osm_obj(fd, obj):
     if obj['type'] == 'N':
-        fd.write('<node id="%(id)d" lat="%(lat).8f" lon="%(lon).8f" version="%(version)s" timestamp="%(timestamp)%" changeset="%(changeset)s" uid="%(uid)s" user="%(user)s"'% obj)
+        fd.write('<node id="%(id)d" lat="%(lat).8f" lon="%(lon).8f" version="%(version)s" timestamp="%(timestamp)s" changeset="%(changeset)s" uid="%(uid)s" user="%(user)s"'% obj)
         if obj['tags'] is None:
             fd.write('/>\n')
         else:
         if obj['tags'] is None:
             fd.write('/>\n')
         else:
@@ -154,7 +154,7 @@ def osm2pgsql_load_place(step):
     logger.debug( "Filename: %s" % fname)
 
     cmd = [os.path.join(world.config.source_dir, 'utils', 'setup.php')]
     logger.debug( "Filename: %s" % fname)
 
     cmd = [os.path.join(world.config.source_dir, 'utils', 'setup.php')]
-    cmd.extend(['--osm-file', fname, '--import-data'])
+    cmd.extend(['--osm-file', fname, '--import-data','--osm2pgsql-cache', '300'])
     proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     (outp, outerr) = proc.communicate()
     assert (proc.returncode == 0), "OSM data import failed:\n%s\n%s\n" % (outp, outerr)
     proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     (outp, outerr) = proc.communicate()
     assert (proc.returncode == 0), "OSM data import failed:\n%s\n%s\n" % (outp, outerr)