After read this How merge osm files with same ID objects? I can't get any conclusion so please don't flag as duplicate.
I have some PBF files came from NASA SRTM ( http://katze.tfiu.de/projects/phyghtmap/phyghtmap.1.html )
My problem is phyghtmap have its own ID numbers and I believe start from same number in every PBF file.
I need to import these PBF files to my database (appart from OSM tables so official OSM ID is not a problem) using osm2pgsql.
For each HGT file I have a PBF and its own ID range that will conflict with the next files and override previous data in database.
How can I import all these files incrementing the ID for every file?
Tools I have: osmosis, osm2pgsql, osmium and phyghtmap.
phyghtmap
program convert HGT to PBF and then I use osm2pgsql to import them to my database.GDAL/OGR
: Tell me what you have in mind and I'll try to do it.osmium merge --verbose *.osm.pbf -o merged.osm.pbf --overwrite
but seems does not work. All PBF are sorted.osmium
,osmosis
orosm2pgsql
? Can I suggest a kind of--re-index
parameter to create newosm_id
based on the "max" ID in database? Forosm2pgsql
we have--create
(truncate and insert new data) and--append
(update and insert new if not exists). We need something to renumber the new ID to avoid conflict (not edit, update or override butforce append
). Same forosmium
whenmerging
.