]> git.openstreetmap.org Git - nominatim.git/commitdiff
state setup: get latest node from place, planet_osm_nodes may be empty
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 9 Mar 2015 20:33:02 +0000 (21:33 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 9 Mar 2015 20:33:02 +0000 (21:33 +0100)
utils/setup.php

index be385698e80afa963484573b1cdc1df156002215..ee079a893de647cdb39c42162605b33a40ee49d5 100755 (executable)
                        }
 
                        // Find the last node in the DB
-                       $iLastOSMID = $oDB->getOne("select max(id) from planet_osm_nodes");
+                       $iLastOSMID = $oDB->getOne("select max(osm_id) from place where osm_type = 'N'");
 
                        // Lookup the timestamp that node was created (less 3 hours for margin for changsets to be closed)
                        $sLastNodeURL = 'http://www.openstreetmap.org/api/0.6/node/'.$iLastOSMID."/1";