[Talk-us] Restoring bus routes in Portland

Peter Dobratz peter at dobratz.us
Fri May 20 16:24:33 UTC 2016


I just found a decent workflow that I can use to restore previous versions
of these route relations.

https://help.openstreetmap.org/questions/4019/how-do-i-restore-data-that-was-lost-during-editing

1. Use the API to download the last good version of the route relation,
save as a .osm file.
2. Add action="modify" to the relation element in the OSM XML file
3. Load OSM XML file into JOSM
4. Download the relation by ID to get the latest version.
5. Handle conflicts by discarding the current relation and using the
version that I loaded from the file.
6. Use the JOSM relation editor to download the members
7. Use the JOSM relation editor to "find the next gap"
8. Download current OSM data for the area with the gap and add appropriate
members to the relation

Luckily, I saved a link to all of these bus routes on a wiki page as it's
impossible to download a relation with zero members (unless you happen to
know the ID):
http://wiki.openstreetmap.org/wiki/Portland,_Oregon/Transit_Route_Relations

Peter

On Fri, May 20, 2016 at 6:06 AM, Andy Townsend <ajt1047 at gmail.com> wrote:

> On 20/05/2016 13:20, Arun Ganesh wrote:
>
>>
>> Reverting the changesets are causing multiple conflicts and there does
>> not seem to be a mechanism to just restore relation membership to a
>> historical version. Any help and ideas appreciated
>>
>> [1] https://github.com/mapbox/mapping/issues/185
>>
>
> If it helps, what I've done when things like this have happened in the
> past is:
>
> 1) Edit failing OSC files to not include relation changes that cause
> problems - i.e. get all the ways and nodes in OSM how you want them.
>
> 2) Find the "desired version" of the relation that you want to update, and
> try and apply that (e.g. via level0).  It'll fail, so find out which ways
> don't exist, take them out of the relation details you're trying to upload
> and try again.
>
> 3) Obviously now you'll have gaps in the relation - either fill them in
> manually if it's obvious, or figure out where the deleted ways that used to
> be in the relation were (by looking at undeleted nodes and the history of
> deleted nodes), and use that information to fill in gaps.
>
> As to "what caused it", there were examples of "relation contents being
> lost in JOSM uploads" a while back, but I've not heard reports of recent
> problems**, though there were reports of API upload slowness a few days ago
> (much discussed elsewhere - and in fact the message at the top of #osm
> still says "Ongoing server issues, sysadmins are on the case").  With any
> change in OSM it makes sense to double check the changes that you've made
> immediately after you've made them - did you really mean to make all
> changes in the resulting changeset?  Are all relations intact? etc.
>
> Cheers,
>
> Andy
>
> PS: and FWIW I guessed that it was the Portland with the homelessness
> problem* and the nice river running through it, not the one with a crab
> fixation or the one that's scared of "underground mutton" :)
>
> * when I last visited, which was a while ago.  They might have got their
> act together now.
>
> ** The DWG often gets cries for help when big relations disappear
>
>
>
> _______________________________________________
> Talk-us mailing list
> Talk-us at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk-us
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-us/attachments/20160520/1403bd41/attachment.html>


More information about the Talk-us mailing list