[OSM-talk] Documentation on Editing Relations

Craig Wallace craigw84 at fastmail.fm
Sat Mar 27 23:48:31 GMT 2010


On 27/03/2010 22:20, Graham Jones wrote:
> Hi,
> I have always tried to avoid using relations (never really accepted that
> is better than adding route= tags to ways, and they seem to complicate
> things quite a lot....), but I am trying to tidy up some long distance
> footpaths that have been done as relations.
>
> The concept of relations is fine, but I am really struggling to find the
> instructions on how to edit them properly without breaking anything -
> for example:
>     If I know a relation number, how do I load it (I don't mind which
> editor!) - the bit of countryside I am editing does not include it, so
> it does not appear in the JOSM relations list, but I have a number from
> a Wiki page.

In JOSM, you can do File -> Download object (or Ctrl+Shift+O), then 
enter the relation number to load it.
Or you can do File -> Open location (Ctrl+L), and enter the URL of the 
API page for that relation. Note it has to be the api.openstreetmap.org 
address, the "browse" page doesn't work.

> I have pretty much worked out how to add ways to relations
> using JOSM's relation editor, but haven't quite worked out how to
> re-order them, apart from doing it manually - is this possible?

In the relation editor, there's an icon on the left hand side for 
"A..Z", which will sort the relation. Also the icon underneath that will 
reverse the order.

> Is there a command line way of adding ways to a relation - for example,
> rather than doing it by clicking on things, I would quite like to do
> "add ways to relation XXXX where route="Pennine Way" or name="Pennine Way".

Not exactly command line, but you can use the Search feature in JOSM (on 
the Edit menu, or Ctrl+F). eg search for "Pennine Way" will select 
everything tagged as that. Then open the relation editor, and you can 
add all of the selected objects to the relation. Just make sure you are 
not adding ways that are already in the relation - JOSM should warn 
about that. You can also search for objects that are not part of a 
relation by using "-child".

> Any pointers would be appreciated.  Sorry for being dumb - I must have
> missed the documentation somewhere?

I'm not sure if there is any particularly good documentation about this. 
There is some stuff on the Relation:route page, including a step by step 
guide for creating a new route relation, but not much about the more 
advanced editing: http://wiki.openstreetmap.org/wiki/Relation:route

The JOSM relation editor was significantly improved / changed fairly 
recently, I don't know if theirs any documentation about its new 
features. The JOSM help seems to be a bit lacking.

Craig




More information about the talk mailing list