Here goes: I would like to write a script or something, that finds cycle parking within a certain cordon that doesn't yet have a capacity=* tag -- as in I would like to locate capacity-less cycle stands, so I can survey and add a capacity to them, add a covered=yes/no tag, cctv=*, etc. I'm not sure how this API business works, so I'm hoping one of you can lead me to finding out how one would go about doing this, and what it would involve. Thanks muchly; here's waiting for a reply.
Discussion
Comment from Tordanik on 28 November 2009 at 17:15
If you don't need to fully automate it, you could use JOSM's search function. Searching for
amenity=bicycle_parking -capacity
would select what you want - you could then copy the selection, paste it into a new layer and save to .osm (or convert the layer to .gpx, depending on where you want to use it).
Comment from wilpin on 28 November 2009 at 18:00
you could download the xml of a area and check for the capacity tag.
This shouldn't be a problem and would work quite fast; save the tag's coordinates which are automatically supplied etc.
Comment from Kevin Steinhardt on 28 November 2009 at 19:07
The JOSM way works really well; not sure how to extract the co-ordinates without having to write them down from the Selection panel. The XML way (I guess I would use the Export menu on the site) seems a bit tedious; I'm not a wizard with AppleScript or elsewhat, so I wouldn't know how to script the co-ords out of that file either.
Comment from EdLoach on 29 November 2009 at 09:45
In JOSM you could perhaps try (after selection), Edit, Copy, File, New, Edit, Paste, File, Save As and you should just then be saving the new layer which only contains the copy of the selected objects. I'd then suggest quitting JOSM to avoid the risk of uploading any duplicates (I'm not sure how easy it is to do this by mistake after doing the above). The .osm file is a .xml file, but would only contain the items you want, so may even by person readable if you printed it?
Comment from wieland on 16 December 2009 at 22:39
You can use XAPI to download amenity=bicycle_parking in a bigger area and than use JOSM or something else to find those without capacity.
e.g.
http://xapi.openstreetmap.org/api/0.6/way[https://wiki.openstreetmap.org/wiki/Tag:amenity=bicycle_parking][bbox=8,49.7,9,50.1]
and
http://xapi.openstreetmap.org/api/0.6/node[https://wiki.openstreetmap.org/wiki/Tag:amenity=bicycle_parking][bbox=8,49.7,9,50.1]
Download it with wget or curl.