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 <[email protected]>
To: Mikel Maron <[email protected]>
Cc: Shaun McDonald <[email protected]>; [email protected]
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 <[email protected]>
>To: Mikel Maron
><[email protected]>
>Cc: [email protected]
>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
>>[email protected]
>>http://lists.openstreetmap.org/listinfo/dev
>>
>
>
________________________________

>_______________________________________________
>dev mailing list
>[email protected] http://lists.openstreetmap.org/listinfo/dev 
_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

Reply via email to