Re: [OSM-dev] CloudMade OSM download problems
Yep, the merge task ;-) The full set of tasks are defined here: http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage To merge two files it's something like: osmosis --rx file2.osm --rx file1.osm --merge --wx merged-file.osm The merge task has a conflictResolutionMethod but the default value should be fine for your purposes. Mikel Maron wrote: Great! That works. Another osmosis question .. is there any way to merge two osm files? I now have an osm for Pakistan and California, and I want to load both. However there is a warning about duplicate key constraint violation .. somehow both Pakistan and California share a node. -Mikel *From:* Brett Henderson *To:* Mikel Maron *Cc:* Shaun McDonald ; dev@openstreetmap.org *Sent:* Thursday, July 30, 2009 5:55:06 PM *Subject:* Re: [OSM-dev] CloudMade OSM download problems Importing into an OSM instance is always problematic due to the foreign key relationships. They're a good idea in the central database, but difficult to satisfy when working offline with extracts and changesets. OPTION 1 If you're just trying to import a one off extract into the database you can use osmosis to fix the referential integrity problems. osmosis --rx myfile.osm.gz --bbox clipIncompleteEntities=true --wx myfixedfile.osm.gz That should modify ways to only refer to nodes that actually exist. No coordinates have been passed to the bbox task so it will select the entire planet (or in this case, the entire input file). Note that modified ways will no longer match the main API ways exactly so they should never be uploaded back to the main database. OPTION 2 If you wish to apply changesets to your database to keep it up to date you'll probably need to drop the problematic foreign key relationships. Brett Mikel Maron wrote: Trying to import into psql for an OSM dev instance. Using osmosis. *From:* Shaun McDonald *To:* Mikel Maron *Cc:* dev@openstreetmap.org *Sent:* Thursday, July 30, 2009 4:30:22 PM *Subject:* Re: [OSM-dev] CloudMade OSM download problems What are you trying to import the extracts into? Shaun On 30 Jul 2009, at 20:47, Mikel Maron wrote: Hi Anyone else have issues with the latest .OSM extracts from CloudMade? I've tried importing Pakistan and California locally, and both files have references to nodes that aren't present. Fortunately GeoFabrik has a Pakistan extract that works. If anyone can help with a California extract, that would be super. -Mikel ___ dev mailing list dev@openstreetmap.org <mailto:dev@openstreetmap.org> http://lists.openstreetmap.org/listinfo/dev ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] CloudMade OSM download problems
Great! That works. Another osmosis question .. is there any way to merge two osm files? I now have an osm for Pakistan and California, and I want to load both. However there is a warning about duplicate key constraint violation .. somehow both Pakistan and California share a node. -Mikel From: Brett Henderson To: Mikel Maron Cc: Shaun McDonald ; dev@openstreetmap.org Sent: Thursday, July 30, 2009 5:55:06 PM Subject: Re: [OSM-dev] CloudMade OSM download problems Importing into an OSM instance is always problematic due to the foreign key relationships. They're a good idea in the central database, but difficult to satisfy when working offline with extracts and changesets. OPTION 1 If you're just trying to import a one off extract into the database you can use osmosis to fix the referential integrity problems. osmosis --rx myfile.osm.gz --bbox clipIncompleteEntities=true --wx myfixedfile.osm.gz That should modify ways to only refer to nodes that actually exist. No coordinates have been passed to the bbox task so it will select the entire planet (or in this case, the entire input file). Note that modified ways will no longer match the main API ways exactly so they should never be uploaded back to the main database. OPTION 2 If you wish to apply changesets to your database to keep it up to date you'll probably need to drop the problematic foreign key relationships. Brett Mikel Maron wrote: Trying to import into psql for an OSM dev instance. Using >osmosis. > > > > From: >Shaun McDonald >To: Mikel Maron > >Cc: dev@openstreetmap.org >Sent: Thursday, July >30, 2009 4:30:22 PM >Subject: Re: [OSM-dev] >CloudMade OSM download problems > >>What are you trying to import the extracts into? > > > >Shaun > > >On 30 Jul 2009, at 20:47, Mikel Maron wrote: > >Hi >> >>>>Anyone else have issues with the latest .OSM extracts from CloudMade? >> >>>>I've tried importing Pakistan and California locally, and both files >>have references to nodes that aren't present. >> >>>>Fortunately GeoFabrik has a Pakistan extract that works. If anyone can >>help with a California extract, that would be super. >> >>>>-Mikel >> >>___ >>>>dev mailing list >>dev@openstreetmap.org >>http://lists.openstreetmap.org/listinfo/dev >> > > >___ >dev mailing list >dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] CloudMade OSM download problems
Importing into an OSM instance is always problematic due to the foreign key relationships. They're a good idea in the central database, but difficult to satisfy when working offline with extracts and changesets. OPTION 1 If you're just trying to import a one off extract into the database you can use osmosis to fix the referential integrity problems. osmosis --rx myfile.osm.gz --bbox clipIncompleteEntities=true --wx myfixedfile.osm.gz That should modify ways to only refer to nodes that actually exist. No coordinates have been passed to the bbox task so it will select the entire planet (or in this case, the entire input file). Note that modified ways will no longer match the main API ways exactly so they should never be uploaded back to the main database. OPTION 2 If you wish to apply changesets to your database to keep it up to date you'll probably need to drop the problematic foreign key relationships. Brett Mikel Maron wrote: Trying to import into psql for an OSM dev instance. Using osmosis. *From:* Shaun McDonald *To:* Mikel Maron *Cc:* dev@openstreetmap.org *Sent:* Thursday, July 30, 2009 4:30:22 PM *Subject:* Re: [OSM-dev] CloudMade OSM download problems What are you trying to import the extracts into? Shaun On 30 Jul 2009, at 20:47, Mikel Maron wrote: Hi Anyone else have issues with the latest .OSM extracts from CloudMade? I've tried importing Pakistan and California locally, and both files have references to nodes that aren't present. Fortunately GeoFabrik has a Pakistan extract that works. If anyone can help with a California extract, that would be super. -Mikel ___ dev mailing list dev@openstreetmap.org <mailto:dev@openstreetmap.org> http://lists.openstreetmap.org/listinfo/dev ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] CloudMade OSM download problems
Trying to import into psql for an OSM dev instance. Using osmosis. From: Shaun McDonald To: Mikel Maron Cc: dev@openstreetmap.org Sent: Thursday, July 30, 2009 4:30:22 PM Subject: Re: [OSM-dev] CloudMade OSM download problems What are you trying to import the extracts into? Shaun On 30 Jul 2009, at 20:47, Mikel Maron wrote: Hi > >Anyone else have issues with the latest .OSM extracts from CloudMade? > >I've tried importing Pakistan and California locally, and both files have >references to nodes that aren't present. > >Fortunately GeoFabrik has a Pakistan extract that works. If anyone can help >with a California extract, that would be super. > >-Mikel >___ >dev mailing list >dev@openstreetmap.org >http://lists.openstreetmap.org/listinfo/dev > ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] CloudMade OSM download problems
What are you trying to import the extracts into? Shaun On 30 Jul 2009, at 20:47, Mikel Maron wrote: Hi Anyone else have issues with the latest .OSM extracts from CloudMade? I've tried importing Pakistan and California locally, and both files have references to nodes that aren't present. Fortunately GeoFabrik has a Pakistan extract that works. If anyone can help with a California extract, that would be super. -Mikel ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] CloudMade OSM download problems
Anyone else have issues with the latest .OSM extracts from CloudMade? I've tried importing Pakistan and California locally, and both files have references to nodes that aren't present. Fortunately GeoFabrik has a Pakistan extract that works. If anyone can help with a California extract, that would be super. I have been trying to build garmin maps with the massachusetts extract, and am having trouble. There appear to be ways with same-coord points in odd ways that mkgmap's --remove-short-arcs doesn't handle, and I can't get the maps to load in Garmin RoadTrip (mac). The .img works on a vista hcx, but routing won't work (even though I used --route). I don't understand what is going on yet. pgp5H6gVQer2G.pgp Description: PGP signature ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
[OSM-dev] CloudMade OSM download problems
Hi Anyone else have issues with the latest .OSM extracts from CloudMade? I've tried importing Pakistan and California locally, and both files have references to nodes that aren't present. Fortunately GeoFabrik has a Pakistan extract that works. If anyone can help with a California extract, that would be super. -Mikel ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev