[OSM-dev] CloudMade OSM download problems

Brett Henderson brett at bretth.com
Fri Jul 31 01:55:06 BST 2009


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 <shaun at shaunmcdonald.me.uk>
> *To:* Mikel Maron <mikel_maron at yahoo.com>
> *Cc:* dev at 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 at openstreetmap.org <mailto:dev at openstreetmap.org>
>> http://lists.openstreetmap.org/listinfo/dev
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090731/ebfe9f26/attachment.html>


More information about the dev mailing list