[openstreetmap/openstreetmap-website] Browse deleted objects (#1448)

Matt Amos notifications at github.com
Mon Feb 20 13:20:16 UTC 2017


> But this is because while @zerebubuth and I agree on 95% of cgimap/rails discussions, the one thing we slightly disagree on is the final destination.

@gravitystorm is correct: We disagree! :wink:

In this situation, my preferred solution would not involve the editing API at all, but instead be a completely separate service which could be run and scaled entirely independently. I think that the more we add to the editing API, the more difficult it becomes to run, maintain and modify in the future.

Having said that, I also don't think that my hand-waving opinions should stand in the way of adding useful functionality. I think that adding something like this would be a good idea, and would be useful.

> The "fordisplay" call behaves identical to "full" for visible objects, but for invisible objects will return a previous, visible version of the object, together with either current or previous versions of dependencies.

Is there any restriction on which previous, visible version of the object will be returned? It would seem sensible that it would return the most recent version that was visible. Are there difficulties guaranteeing that? What would happen if the current version is deleted and the only previous version is redacted?

If it can return either the current or the previous versions of dependencies, is it possible that it returns deleted versions of nodes used in a way? Could the API call be defined to return the versions of dependencies which were visible at the time that the element was deleted?

I'm slightly concerned about putting `deleted="true"` at the root of the XML document as well, as it would be effectively extending the XML content with style information. That seems like something that could be handled in the client javascript by falling back to `/fordisplay` (I prefer @Zverik's suggestion of `/last_visible`) if the current `/full` returns a `visible="false"` or 404 entry. Or perhaps the `/fordisplay` call could return the current version always, _plus_ the last visible version if the current version is not visible?

> ... implement them both in rails and cgimap or just in one, and if just in one what would be preferred?
>
> Naturally just adding something to cgimap is rather problematic at this point in time.

Yes, an implementation in both would be very welcome, or just Rails if only one is being done. Unfortunately, we're still stuck halfway without a full replacement for the Rails API in cgimap(-ruby). If anyone would like to help with that, then please take a look at the [Cgimap issues](https://github.com/zerebubuth/openstreetmap-cgimap/issues), which I've tried to mark up with difficulty levels. Please get in touch with me if there's something I can do to help you get started with Cgimap.


-- 
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/pull/1448#issuecomment-281077410
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170220/038d7032/attachment-0001.html>


More information about the rails-dev mailing list