[OSM-talk] Deleted way belonging to relations

Richard Fairhurst richard at systemed.net
Thu Dec 11 17:15:59 GMT 2008


Shaun McDonald wrote:
> It is a limitation of the 0.5 API.
> This problem is highly less likely to happen with 0.6 API, with 
> the introduction of node/way/relation versioning and transactions.

Though it doesn't really need 0.6 to work, it just needs this bug fixing
(Dave, I think this is your code so you might be able to explain better?):

# BUG: the following is commented out because it always fails on my
# install. I think it's a Rails bug.
# if !rel.preconditions_ok?
#    return -2, "Relation preconditions failed"

(from
http://trac.openstreetmap.org/browser/sites/rails_port/app/controllers/amf_controller.rb#L308)

> [add/remove object from relations]
> This would mean that we no longer have a restful api.

No, but OTOH we'd have one that worked better. ;)

More seriously, there is a school of thought that POST adds, PUT replaces.
So in this case you'd just have a POST request to add an item to a relation.
(Wikipedia confirms, FWIW.) We don't currently use POST for anything other
than uploading GPXs AFAIK.

cheers
Richard
-- 
View this message in context: http://www.nabble.com/Deleted-way-belonging-to-relations-tp20957643p20960030.html
Sent from the OpenStreetMap - General mailing list archive at Nabble.com.





More information about the talk mailing list