[OSM-dev] Current planet file is broken

Brett Henderson brett at bretth.com
Fri Apr 24 08:36:09 BST 2009


Frederik Ramm wrote:
> Hi,
>
> Matt Amos wrote:
>   
>> On Fri, Apr 24, 2009 at 12:00 AM, Frederik Ramm <frederik at remote.org> wrote:
>>     
>>> Frederik Ramm wrote:
>>> This is due to a bug in the planet dump script which I have fixed (review
>>> before use, please).
>>>       
>> d'oh :-)
>>     
>
> ,-)
>
> Unfortunately my fix doesn't fix it either; Osmosis now complains that
>
> SEVERE: Thread for task 3-read-xml-0.6 failed
> org.openstreetmap.osmosis.core.OsmosisRuntimeException: The member type 
> Way is not recognised.
>          at 
> org.openstreetmap.osmosis.core.xml.v0_6.impl.MemberTypeParser.parse(MemberTypeParser.java:40)
>
> This is obviously because the member types are now capitalised (Node, 
> Way, Relation) instead of the old node, way, relation. It's the same 
> problem that Potlatch has run into after the upgrade, I believe.
>
> (How does Osmosis produce the daily diffs then, I wonder?)
>
> A fixed "fixplanet.gz" is available in the same location...
>
> I assume that there will be a number of other downstream programs that 
> break when being confronted with Node, Way, and Relation - should we 
> perhaps simply change that back to lowercase in the database?
>
> (Note that "we" in the last sentence does not really mean "we" but 
> rather "you" ;-)
>   
Osmosis has been updated to upper case the database member type names 
but not xml member type names.  I believed the reason for making them 
upper case in the database was to railsify something, not for any 
aesthetics reason.  I didn't change the xml processing simply because it 
never occurred to me that it would be necessary.

In fact I've just checked the the api xml still uses lower case values 
so I think osmosis is still correct.

I believe it's a bug in the planet dumper, it should be converting them 
to lower case when writing the xml.

If osmosis does need to make a change, feel free to change the following 
classes because I won't be around for the next 14 hours at least.
org.openstreetmap.osmosis.core.xml.v0_6.impl.MemberTypeRenderer
org.openstreetmap.osmosis.core.xml.v0_6.impl.MemberTypeParser

Brett





More information about the dev mailing list