[OSM-dev] [OSM-talk] Trouble in Rangoon

Richard Fairhurst richard at systemeD.net
Thu Feb 28 16:55:54 GMT 2008


Frederik Ramm wrote:

> Don't know how others feel about this. The whole "changeset" and  
> "rollback" complex is very high on my personal "next big thing I'll  
> tackle if time allows" list but I think it is of equal complexity  
> to the introduction of relations last year; it will probably  
> require changes to editors and warrant a bump to API 0.6... I  
> haven't made a lot of noise about this yet because I didn't want to  
> say "I'm going to do it" and by saying so block anyone else who  
> might get it done faster and I cannot really promise that I have it  
> done by such-and-such a date. (It sure is the kind of thing that  
> could be achieved if the right people sat in the same room for a  
> weekend, IF a weekend can be found where they can meet...) But I'm  
> theoretically willing and able to at least create a prototype that  
> we can then test-drive together.

I'd strongly encourage anyone thinking of working on this to at least  
have a look at how Potlatch does revert/history and undelete.

Very very roughly there are two operations:

- tell me which ways have been deleted in an area
- return a deleted way and all its constituent nodes

and a lot of code around that to cope with all the various cases of  
nodes being moved/deleted/merged etc.

It's all in amf_controller.rb and I can happily talk you through the  
code if it's too opaque. Moving this to be more Rails-like (it is,  
together with a lot of amf_controller, currently very SQL-heavy), and  
opening it up to the XML API, would go a long way to solving the  
frequently-encountered "a whole area has been deleted" problem -  
because if you can make it visible via the API, the script then  
required to rollback an area is only about three lines long.

cheers
Richard




More information about the dev mailing list