Opened 3 weeks ago
Closed 2 weeks ago
#24746 closed defect (worksforme)
Member Of in Properties and Relation toolboxes for routes should use description
| Reported by: | KelleyCook | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Click on any highway with a relation
- Open Properties toolbox or Relation toolbox
- Look at the relation section
What is the expected result?
The relation section shows the description of the route relation "Future I-11 North", "I 40 (AZ) (West)", etc.
What happens instead?
It only gives the route number in the case of the screenshot 11, 11, 40, 40, 93, 93
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2026-03-28 20:28:41 +0100 (Sat, 28 Mar 2026) Revision:19555 Build-Date:2026-03-29 01:30:57 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (19555 en) Windows 11 64-Bit OS Build number: Windows 10 Pro 25H2 (26200) Memory Usage: 396 MB / 8176 MB (82 MB allocated, but free) Java version: 21.0.11+10-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 2560x1440x32bpp@144Hz (scaling 1.00×1.00) Maximum Screen Size: 2560×1440 Best cursor sizes: 16×16→32×32, 32×32→32×32 System property file.encoding: UTF-8 System property sun.jnu.encoding: Cp1252 Locale info: en_US Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Dicedtea-web.bin.location=%UserProfile%\AppData\Local\Programs\OpenWebStart\javaws, -Djava.util.Arrays.useLegacyMergeSort=true, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djava.security.manager=allow] Dataset consistency test: No problems found Plugins: + Relation.Validation.Plugin (1.0.1) + RelationDissolve (0.2.0) + apache-commons (36474) + ejml (36474) + geotools (36474) + imagery_offset_db (36474) + jackson (36474) + jaxb (36474) + jts (36474) + michigan_left (36474) + opendata (36474) + reltoolbox (36474) + reverter (36474) + turnrestrictions (36474) + utilsplugin2 (36497) Map paint styles: - https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1 + https://josm.openstreetmap.de/josmfile?page=Styles/ColourGPSData&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features_ryg&zip=1 Last errors/warnings: - 00039.097 W: java.net.SocketTimeoutException: Connect timed out - 00039.097 W: java.net.SocketTimeoutException: Connect timed out - 00039.097 W: java.net.SocketTimeoutException: Connect timed out - 00039.097 W: java.net.SocketTimeoutException: Connect timed out - 00039.097 W: java.net.SocketTimeoutException: Connect timed out - 00039.097 W: java.net.SocketTimeoutException: Connect timed out - 00039.098 W: java.net.SocketTimeoutException: Connect timed out - 00039.098 W: java.net.SocketTimeoutException: Connect timed out - 00039.098 W: java.net.SocketTimeoutException: Connect timed out - 00039.098 W: java.net.SocketTimeoutException: Connect timed out
Attachments (1)
Change History (5)
by , 3 weeks ago
| Attachment: | Screenshot 2026-05-27 141325.png added |
|---|
comment:1 by , 3 weeks ago
I believe the fix is very simple. In josm/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java String[] DEFAULT_NAMING_TAGS_FOR_RELATIONS move "ref" down thirteen lines to be below "description"
comment:2 by , 3 weeks ago
-
DefaultNameFormatter.java
old new 104 104 */ 105 105 private static final String[] DEFAULT_NAMING_TAGS_FOR_RELATIONS = { 106 106 "name", 107 "ref",108 107 // 109 108 "amenity", 110 109 "landuse", … … 118 117 // 119 118 ":LocationCode", 120 119 "description", 120 "ref", 121 121 "note", 122 122 "?building", 123 123 "?building:part",
comment:3 by , 3 weeks ago
Did not try it but I think you can simply change the preference relation.nameOrder to get what you want.
comment:4 by , 2 weeks ago
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |
I've now tested this. It's a bit complicated for an end user but possible:
- load data whith a relation (without this step the default value for the preference is not loaded)
- press F12 to open preferences -> Advandced preferences
- enter relation.nameOrder as a filter
- Click edit and add e.g. test as last entry (I found no way to change the order directly or add an entry in that list)
- press OK
- stop JOSM
- open preferences.xml in a text editor and search for relation.nameOrder
This should show
<list key='relation.nameOrder'>
<entry value='name'/>
<entry value='ref'/>
<entry value='amenity'/>
<entry value='landuse'/>
<entry value='leisure'/>
<entry value='natural'/>
<entry value='public_transport'/>
<entry value='restriction'/>
<entry value='water'/>
<entry value='waterway'/>
<entry value='wetland'/>
<entry value=':LocationCode'/>
<entry value='description'/>
<entry value='note'/>
<entry value='?building'/>
<entry value='?building:part'/>
<entry value='test'/>
</list>
- remove the line with test and edit the order of the list so that it looks like this:
<list key='relation.nameOrder'> <entry value='name'/> <entry value='description'/> <entry value='ref'/> <entry value='amenity'/> <entry value='landuse'/> <entry value='leisure'/> <entry value='natural'/> <entry value='public_transport'/> <entry value='restriction'/> <entry value='water'/> <entry value='waterway'/> <entry value='wetland'/> <entry value=':LocationCode'/> <entry value='note'/> <entry value='?building'/> <entry value='?building:part'/> </list>
JOSM now prefers the description.
For those who read this text: Simply add the last block into preferences.xml, e.g. before the last line containing </preferences>



Screenshot of Properties box