[openstreetmap/openstreetmap-website] Diff upload does not allow forward references to placeholders (#1465)

Matt Amos notifications at github.com
Mon Feb 27 11:50:06 UTC 2017


Is it not possible to assign PKs to get the following?

```xml
<osmChange version="0.6" generator="iD">
   <create>
      <node id="1" lon="11.625506992810122" lat="46.866699181636555" version="0" changeset="3">
         <tag k="highway" v="bus_stop" />
      </node>
      <node id="2" lon="11.62686047585252" lat="46.86730122861715" version="0" changeset="3">
         <tag k="highway" v="bus_stop" />
      </node>
      <relation id="1" version="0" changeset="3">
         <member type="node" role="" ref="1" />
         <tag k="type" v="route" />
         <tag k="name" v="AtoB" />
      </relation>
      <relation id="2" version="0" changeset="3">
         <member type="node" role="" ref="2" />
         <tag k="type" v="route" />
         <tag k="name" v="BtoA" />
      </relation>
      <relation id="3" version="0" changeset="3">
         <member type="relation" role="" ref="1" />
         <member type="relation" role="" ref="2" />
         <tag k="type" v="route_master" />
         <tag k="name" v="master" />
      </relation>
   </create>
</osmChange>
```

This can be done within any `<create>` block via the algorithm I gave earlier. More extensive reordering might be possible, although the explosion of different interactions is giving me a headache.

I think it would be good to have a patch for `<create>`-reordering, and it would help to have this in one place (i.e: the API) rather than in every editor, as long as it's not computationally onerous.

A significant downside, in my opinion, is that it makes it much harder to understand or explain what the upload call is doing. At the moment, it seems fairly easy to understand that it processes the elements in the order they appear in the upload. Reordering some kinds of changes and not others adds complexity and requires explanation, making the API more baffling. And some would say it's already plenty baffling enough.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/1465#issuecomment-282699734
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170227/cf7c56aa/attachment.html>


More information about the rails-dev mailing list