I have a problem merging and then importing two OSM files. I downloaded to distinct .osm-files from cloudmade. They are not sharing any geographical attribute (as the first is the country Monaco, the 2nd is the county Bremen in Germany). I merged the with OSMOSIS and it gives me an output file. Then I import it via OSM2PGSQL. Looking at the dataset using QGIS it either shows me the data of Bremen or Monaco (depending the order in the OSMOSIS merge statement). Does anyone has a solution for this problem? Thanks a lot Carsten EDIT: I imported like described further down. Downloaded Bremen and Monaco planet files and imported them like this: $osm2pgsql -l --create --database gis --username postgres --prefix planet --slim --cache 2048 /home/katia/Downloads/monaco.osm.bz2 -S /usr/share/osm2pgsql/default.style $osm2pgsql -l --append --database gis --username postgres --prefix planet --slim --cache 2048 /home/katia/Downloads/bremen_1.osm.bz2 -S /usr/share/osm2pgsql/default.style The two files seems to be correctly imported into postgis. No duplicates. But trying them visualizing them in OpenJump it displayes only the bremen.osm data. In PGAdmin3 it shows me that the tables do not have any primary key. How do set them correctly? Thanks asked 13 Feb '13, 10:45 hoge6b01 |
I'm guessing that you're missing the "append" on the second import? If you have a look here you'll see how that can be used, and also a description of a further problem that you might get if there's any data overlap between the two (which in your case there probably won't be). answered 13 Feb '13, 10:58 SomeoneElse ♦ Thanks. I will give it a new try when I'm at home. btw, how do I temporary drop contrains?
(13 Feb '13, 11:26)
hoge6b01
|
(not that it's directly related to your question but) do be aware that the date quoted for the data at http://downloads.cloudmade.com/ is 13 December 2011.
oh, i haven't seen that. Thank you! What do you suggest to download from?
There are lots of extract sites available - see this page. I tend to use Geofabrik myself, but there are lots of others.
I thought Geofabrik "pre-selects" the OSM content. Not that OSM2PGSQL selects the content defined in the default.style as well, but does Geofabrik contain the tags from default.style?