]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Thu, 19 Sep 2013 21:47:27 +0000 (23:47 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 19 Sep 2013 21:47:27 +0000 (23:47 +0200)
osm2pgsql
sql/functions.sql
utils/update.php

index 0005c3312cdbddb51fdb749315d4c7df59daa82a..48377cecdccacc64528fe070a1495cb2070e833a 160000 (submodule)
--- a/osm2pgsql
+++ b/osm2pgsql
@@ -1 +1 @@
-Subproject commit 0005c3312cdbddb51fdb749315d4c7df59daa82a
+Subproject commit 48377cecdccacc64528fe070a1495cb2070e833a
index ac64defc34e2a3393937eb0b61b272ba86790c3d..818f6ac12d96e5e6a2e8b600014dcff9f82411d6 100644 (file)
@@ -938,10 +938,6 @@ BEGIN
   --DEBUG: RAISE WARNING '% %',NEW.osm_type,NEW.osm_id;
 
   -- just block these
-  IF NEW.class = 'highway' and NEW.type in ('turning_circle','traffic_signals','mini_roundabout','noexit','crossing') THEN
---    RAISE WARNING 'bad highway %',NEW.osm_id;
-    RETURN null;
-  END IF;
   IF NEW.class in ('landuse','natural') and NEW.name is null THEN
 --    RAISE WARNING 'empty landuse %',NEW.osm_id;
     RETURN null;
@@ -2057,9 +2053,6 @@ BEGIN
   END IF;
 
   -- Just block these - lots and pointless
-  IF NEW.class = 'highway' and NEW.type in ('turning_circle','traffic_signals','mini_roundabout','noexit','crossing') THEN
-    RETURN null;
-  END IF;
   IF NEW.class in ('landuse','natural') and NEW.name is null THEN
     RETURN null;
   END IF;
@@ -2110,6 +2103,9 @@ BEGIN
   IF existingplacex.osm_type IS NULL THEN
 
     IF existing.osm_type IS NOT NULL THEN
+      -- pathological case caused by the triggerless copy into place during initial import
+      -- force delete even for large areas, it will be reinserted later
+      UPDATE place set geometry = ST_SetSRID(ST_Point(0,0), 4326) where osm_type = NEW.osm_type and osm_id = NEW.osm_id and class = NEW.class and type = NEW.type;
       DELETE from place where osm_type = NEW.osm_type and osm_id = NEW.osm_id and class = NEW.class and type = NEW.type;
     END IF;
 
@@ -2268,7 +2264,7 @@ BEGIN
       country_code = NEW.country_code,
       parent_place_id = null,
       extratags = NEW.extratags,
-      admin_level = NEW.admin_level,
+      admin_level = CASE WHEN NEW.admin_level > 15 THEN 15 ELSE NEW.admin_level END,
       indexed_status = 2,    
       geometry = NEW.geometry
       where place_id = existingplacex.place_id;
index d3c2bc73c89836bd2b778e1cfe20a9544879bf06..270850f93b4cec6197db67f4c326b28d4f9ff3c0 100755 (executable)
 
        if ($aResult['import-osmosis'] || $aResult['import-osmosis-all'])
        {
+
+               if (strpos(CONST_Replication_Url, 'download.geofabrik.de') !== false && CONST_Replication_Update_Interval < 86400) {
+                       echo "Error: Update interval too low for download.geofabrik.de.  Please check install documentation (http://wiki.openstreetmap.org/wiki/Nominatim/Installation#Updates)\n";
+                       exit;
+               }
+
                $sImportFile = CONST_BasePath.'/data/osmosischange.osc';
                $sOsmosisCMD = CONST_Osmosis_Binary;
                $sOsmosisConfigDirectory = CONST_BasePath.'/settings';
 
                        if ( CONST_Replication_Update_Interval > 60 )
                        {
-                               $iSleep = round(CONST_Replication_Update_Interval*0.8);
+                               $iSleep = max(0,(strtotime($sBatchEnd)+CONST_Replication_Update_Interval-time()));
                        }
                        else
                        {