Opened 6 days ago
Last modified 3 days ago
#24588 needinfo enhancement
Show ref or name tags instead of railway:position
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Core | Version: | latest |
| Keywords: | Cc: |
Description
Last year I became aware of catenary pole label and milepost information (both existing poles and future poles) for a section in and next to the Delco Lead project in New Jersey. I applied both railway:position and ref tags.
Examples:
https://www.openstreetmap.org/node/11103297852
power=tower
railway:position=33.94
ref=M-415
https://www.openstreetmap.org/node/13137237507
construction:power=catenary_mast
railway:position=33.94
ref=M-415
In JOSM these display only the railway:position. I presume this is because JOSM is assuming anything with railway:position is a milepost. JOSM should be displaying the ref or name instead.
Attachments (0)
Change History (4)
comment:1 by , 6 days ago
| Summary: | Show → Show ref or name tags instead of railway:position |
|---|
comment:2 by , 6 days ago
| Owner: | changed from to |
|---|---|
| Status: | new → needinfo |
comment:3 by , 3 days ago
Thanks for the source code. I see that it's a little difficult to make exceptions to make the name tag precedence dependent on the object at hand.
I did some quick analysis of nodes with railway:position and no "name" that aren't milestones.
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“"railway:position"=* and railway != milestone and "name"=*”
*/
[out:json][timeout:25];
// gather results
nwr["railway:position"]["railway"!="milestone"][!"name"]["ref"]({{bbox}});
// print results
out geom;
With a bounding box of Washington, DC to Boston, this gives me 284 objects.
176 of them are the cat poles (existing or under construction) I mentioned in this ticket
37 of them are railway=signal (including some of my own work)
66 of them are railway=switch all near Boston and all of them define railway:position in chaining units (US feet, such as "344+12")
3 are railway=level_crossing in Highland (Lloyd), New York
2 are railway=railway_crossing in Boston
node 12238556558
railway:position=13.6
railway=signal
ref=B136
node 2988387491
railway:position=mi:6.8
railway=signal
ref=DUNTON 2L
node 6042744651
railway:position=20+55
railway=switch
ref=79
node 6568254471
railway:position=21+46
railway=railway_crossing
ref=92
node 213879403
railway:position=mi:72.3
railway=level_crossing
ref=507114S
All of the above are showing railway:position instead of ref. I think this a strong case that railway=milestone is the only kind of node that should be showing railway:position as its display name.
comment:4 by , 3 days ago
In this case probably a naming template for railway=milestone is the way to go?



As far as I can see in the code it displays name, int_name, distance, railway:position, ... in this order. source:trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LabelCompositionStrategy.java#L170 This was added in #20326 at this position.
Should it be moved down one step? But then the more helpful railway:position would no longer be displayed.