]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/environment.py
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / test / bdd / environment.py
index a1a9c0bd739e3bf3e13c448d6d6169c7b0faaaf9..58494deb9858f867221572a48795b7d0515181ff 100644 (file)
@@ -40,6 +40,7 @@ class NominatimEnvironment(object):
     def write_nominatim_config(self, dbname):
         f = open(self.local_settings_file, 'w')
         f.write("<?php\n  @define('CONST_Database_DSN', 'pgsql://@/%s');\n" % dbname)
     def write_nominatim_config(self, dbname):
         f = open(self.local_settings_file, 'w')
         f.write("<?php\n  @define('CONST_Database_DSN', 'pgsql://@/%s');\n" % dbname)
+        f.write("@define('CONST_Osm2pgsql_Flatnode_File', null);\n")
         f.close()
 
     def cleanup(self):
         f.close()
 
     def cleanup(self):
@@ -153,8 +154,9 @@ class OSMDataFactory(object):
 
     def parse_geometry(self, geom, scene):
         if geom.find(':') >= 0:
 
     def parse_geometry(self, geom, scene):
         if geom.find(':') >= 0:
-            out = "POINT(%s)" % self.get_scene_geometry(scene, geom)
-        elif geom.find(',') < 0:
+            return "ST_SetSRID(%s, 4326)" % self.get_scene_geometry(scene, geom)
+
+        if geom.find(',') < 0:
             out = "POINT(%s)" % self.mk_wkt_point(geom)
         elif geom.find('(') < 0:
             line = ','.join([self.mk_wkt_point(x) for x in geom.split(',')])
             out = "POINT(%s)" % self.mk_wkt_point(geom)
         elif geom.find('(') < 0:
             line = ','.join([self.mk_wkt_point(x) for x in geom.split(',')])