Hi!

I am working on the issue 
#1683<https://github.com/osm-search/Nominatim/issues/1683>(Update script for 
running updates on a database with multiple countries). 
This<https://gist.github.com/krahulreddy/8d08a8b2a77581810effa88d1641a571> is a 
modified script I used. This worked for me. But there are a few issues.

1) The sequenceNumber in import_status might not be the same for all the 
counties. Unless this is fied, there might be data loss during updates. This 
could be fixed by changing the structure of the import_status table to allow 
country specific entries.(Is it a good idea?)

2) In Setup.php, init-updates option gets the latest date from the lib function 
getDatabaseDate(), which returns date corresponding to the object that has the 
highest osm_id. This would be wrong if the latest changes include deletions. I 
think comparing lastimportdate in import_status with the previous approach 
could be a good thing. This will help avoid repeated updates on deleted nodes.

I also wrote a shell script to setup db with multiple countries, which can be 
found 
here<https://gist.github.com/krahulreddy/948679bae414b5bfbdbe5fe489126eea>.

An alternate approach for setting up updates for multiple countries would be to 
modify the Replication URL constant. This could be done by editing the existing 
utils/update.php, or by maintaining a separate copy of utils/update.php with 
necessary modifications.


Is there any way of addressing these issues?


Regards,

Rahul


_______________________________________________
Geocoding mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/geocoding

Reply via email to