<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Yep, the merge task ;-)<br>
<br>
The full set of tasks are defined here:<br>
<a class="moz-txt-link-freetext" href="http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage">http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage</a><br>
<br>
To merge two files it's something like:<br>
osmosis --rx file2.osm --rx file1.osm --merge --wx merged-file.osm<br>
<br>
The merge task has a conflictResolutionMethod but the default value
should be fine for your purposes.<br>
<br>
Mikel Maron wrote:
<blockquote cite="mid:819408.19546.qm@web30804.mail.mud.yahoo.com"
type="cite">
<style type="text/css"><!-- DIV {margin:0px;} --></style>
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div>Great! That works.<br>
<br>
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.<br>
<br>
-Mikel<br>
</div>
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br>
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font
face="Tahoma" size="2">
<hr size="1"><b><span style="font-weight: bold;">From:</span></b>
Brett Henderson <a class="moz-txt-link-rfc2396E" href="mailto:brett@bretth.com"><brett@bretth.com></a><br>
<b><span style="font-weight: bold;">To:</span></b> Mikel Maron
<a class="moz-txt-link-rfc2396E" href="mailto:mikel_maron@yahoo.com"><mikel_maron@yahoo.com></a><br>
<b><span style="font-weight: bold;">Cc:</span></b> Shaun McDonald
<a class="moz-txt-link-rfc2396E" href="mailto:shaun@shaunmcdonald.me.uk"><shaun@shaunmcdonald.me.uk></a>; <a class="moz-txt-link-abbreviated" href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
<b><span style="font-weight: bold;">Sent:</span></b> Thursday, July
30, 2009 5:55:06 PM<br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [OSM-dev]
CloudMade OSM download problems<br>
</font><br>
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.<br>
<br>
OPTION 1<br>
If you're just trying to import a one off extract into the database you
can use osmosis to fix the referential integrity problems.<br>
osmosis --rx myfile.osm.gz --bbox clipIncompleteEntities=true --wx
myfixedfile.osm.gz<br>
<br>
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.<br>
<br>
OPTION 2<br>
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.<br>
<br>
Brett<br>
<br>
Mikel Maron wrote:
<blockquote type="cite">
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div>Trying to import into psql for an OSM dev instance. Using
osmosis.<br>
</div>
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br>
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font
face="Tahoma" size="2">
<hr size="1"><b><span style="font-weight: bold;">From:</span></b>
Shaun McDonald <a moz-do-not-send="true" rel="nofollow"
class="moz-txt-link-rfc2396E"
ymailto="mailto:shaun@shaunmcdonald.me.uk" target="_blank"
href="mailto:shaun@shaunmcdonald.me.uk"><shaun@shaunmcdonald.me.uk></a><br>
<b><span style="font-weight: bold;">To:</span></b> Mikel Maron
<a moz-do-not-send="true" rel="nofollow"
class="moz-txt-link-rfc2396E" ymailto="mailto:mikel_maron@yahoo.com"
target="_blank" href="mailto:mikel_maron@yahoo.com"><mikel_maron@yahoo.com></a><br>
<b><span style="font-weight: bold;">Cc:</span></b>
<a moz-do-not-send="true" rel="nofollow"
class="moz-txt-link-abbreviated" ymailto="mailto:dev@openstreetmap.org"
target="_blank" href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
<b><span style="font-weight: bold;">Sent:</span></b> Thursday, July
30, 2009 4:30:22 PM<br>
<b><span style="font-weight: bold;">Subject:</span></b> Re:
[OSM-dev]
CloudMade OSM download problems<br>
</font><br>
What are you trying to import the extracts into?
<div><br>
</div>
<div>Shaun</div>
<div><br>
<div>
<div>On 30 Jul 2009, at 20:47, Mikel Maron wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite"><span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div>
<div
style="margin: 0px; font-family: 'times new roman','new york',times,serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin: 0px;">Hi<br>
<br>
Anyone else have issues with the latest .OSM extracts from CloudMade?<br>
<br>
I've tried importing Pakistan and California locally, and both files
have references to nodes that aren't present.<br>
<br>
Fortunately GeoFabrik has a Pakistan extract that works. If anyone can
help with a California extract, that would be super.<br>
<br>
-Mikel<br>
</div>
</div>
_______________________________________________<br>
dev mailing list<br>
<a moz-do-not-send="true" rel="nofollow"
ymailto="mailto:dev@openstreetmap.org" target="_blank"
href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
<span><span><a moz-do-not-send="true" target="_blank"
href="http://lists.openstreetmap.org/listinfo/dev">http://lists.openstreetmap.org/listinfo/dev</a></span></span><br>
</div>
</span></blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
<pre><hr size="4" width="90%">
_______________________________________________
dev mailing list
<a moz-do-not-send="true" rel="nofollow"
class="moz-txt-link-abbreviated" ymailto="mailto:dev@openstreetmap.org"
target="_blank" href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a>
<a moz-do-not-send="true" rel="nofollow" class="moz-txt-link-freetext"
target="_blank" href="http://lists.openstreetmap.org/listinfo/dev">http://lists.openstreetmap.org/listinfo/dev</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>