[OSM-dev] Augmented Diffs

Serge Wroclawski emacsen at gmail.com
Wed Aug 29 14:45:26 BST 2012


On Tue, Aug 28, 2012 at 12:28 PM, Roland Olbricht
<roland.olbricht at gmx.de> wrote:

>> Similarly "osmChange" or "osc" files are already maybe you should call

>> 2. The sections are a bit confusing in that the order is very
>
>> important. That makes parsing a bit more difficult than it might need
>
>> to be if you just renamed sections? Eg "keep" means two different
>
>> things in two different contexts, but by using the same name, it means
>
>> your parser must keep a lot of state.

> What do you mean exactly? The purpose of the elements in keep is always the
> same: this is data that is unchanged but related to changed data.

Yes, but (and maybe I'm reading it wrong), in the original version,
the heirarchy is flat, so your indication of which "keep", you're in
is related to the order, and not some other method of keeping state.
Was I mis-reading the XML?

> Of course there are different reasons why an element arrives in keep.
> However, this will make things difficult: an element could be present for
> more than one reason, for example a node because it is referred by more than
> one element.

The alternative of this might be to add those back references in the
XML such that a node has a new section:

<partof>
  <way id="###" version="###" />

or

  <relation id....    />

no need to have the entire object there, just the type, ID and
version- it's more verbose but then you have those links automatically
built from the onset.


And or, maybe toss the XML and use JSON or PBF?

- Serge



More information about the dev mailing list