Modify

Opened 11 years ago

Last modified 6 months ago

#4596 new enhancement

Relations are not always easily distinguishable

Reported by: NE2 Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description (last modified by alv)

If you have several relations for different parts of a route, like those on http://wiki.openstreetmap.org/wiki/Interstate_Highway_relations (some routes are split by state or direction), there's no way to distinguish them in the relation list on the right if you use the tags such that they apply to the underlying elements (so ref is just 95 or I 95 and name is either blank or a name like "Delaware Turnpike").

This specific case would be solved by including addr:state and direction tags if present, but there are many other possible situations where this could cause a problem. I suggest supporting a new relation_name tag that would give each relation a unique name like "Interstate 95 in Delaware (northbound)".

Attachments (0)

Change History (8)

comment:1 Changed 11 years ago by mjulius

Type: defectenhancement

comment:2 Changed 11 years ago by stoecker

Hmm, JOSM bug tracker is not really to right forum to introduce new tags. If the tag is used in database, then JOSM will support it.

comment:3 Changed 10 years ago by rickmastfan67

You know, I think the easy way to do what NE2 is asking is to combine parts of the relation to display them on the right hand side of the screen. For instance, if a relation doesn't have a name tag, but does have the "description" tag, display the "description" name instead of the "ref" tag. It could go a long way in what NE2 is suggesting without adding a brand new tag.

Here's an example:
For instance, relation 396362 is for I-95 in Delaware. As of right now, when you load the relation in JOSM, in the relation menu, it just shows it as "95", which is the "ref" tag. If you had other I-95 relations loaded, you would have to check each one to figure out which one you wanted to edit. But, it has a "description" tag with "I 95 (DE)" in it. If you could show the "description" tag on the right in the relations area instead of the "ref" tag (unless a "name" tag is present), this could be solved right away. Plus the "description" tag is an official tag. ;)

comment:4 Changed 9 years ago by alv

Description: modified (diff)

JOSM seems to display the contents of note=* in the relation list; at the moment 55 900 relations have a note=*, whereas 13 500 carry a description=*. This usage of note=* is a bit different from note=* used on ways and nodes. I'm inclined to believe mappers have used it on relations because it makes editing easier, when description=* would be more in line with the other uses of these tags outside of relations. It would be best if JOSM were to use the description=* before a note=*.

comment:5 Changed 9 years ago by jttt

As a workaround, you can use http://josm.openstreetmap.de/wiki/NameTemplate to display relations or other primitives in way that suits you.

comment:6 Changed 9 years ago by alv

Found out that, locally, to use it one only needs to set the advanced preference relation.nameOrder to the array copied from the source code, with "description" added at the suitable row. Simply adding "description", to gui/DefaultNameFormatter.java line 86 (don't have dev environment set up atm) would do the same for all who haven't yet set a custom relation.nameOrder. But first I might have to initiate a mailing list discussion about note=* and description=* on relations, now that I've pondered the issue for some time.

comment:7 Changed 6 months ago by lonvia

I'd like to resurrect this ticket because 9 years later the name tag on route relations has pretty much become "whatever makes me find the relation in JOSM's relation list". I'm exaggerating but it would be really great if we could eliminate JOSM as an excuse for abusing the name tag. ;)

'relation.nameOrder' is a nice start to improve what is displayed in the relation list but it is not powerful enough. We need tag combinations. Just look at what the wiki expects to put into the name tag for PTv2 relations (https://wiki.openstreetmap.org/wiki/Tag:route%3Dbus).

I've looked into the 'name_template' attribute for the presets and they are perfect for the purpose. The tiny problem here is that the name templates can only be defined together with a preset entry. So I can't write a custom preset that just sets name templates for the routes and otherwise uses the default route preset templates.

I see two possibilities here: a) Make name templates independent from present items and allow people to define custom template lists similar to the preset lists, b) Start using name templates in the default presets of JSOM and just get better naming for all.

What do you think? Is one of those doable? Or is there another way to influence the relation list output I'm not aware of?

comment:8 Changed 6 months ago by stoecker

Start using name templates in the default presets of JSOM and just get better naming for all.

Sure, why not. Propose a patch for better name display.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to NE2
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.