Skip to content

Add rail-centric tags to vector tiles #637

Closed
Closed

Description

@flha127

Hi,

I am making a stylesheet similar to what OpenRailwayMap did (see below), would it be possible to add these tags:

For railways:
electrified
high speed
usage

For highways/railways indoor=yes and covered=yes should be added as they are similar to tunnel=yes.

For highways/railways and bridges the layer tags would help with rendering.



Activity

  1. 1ec5 commented on Nov 25, 2023

    @1ec5
    Member

    Awesome, there was talk of this in #405, but I’m glad you’re taking the initiative to create the style yourself! I agree that these keys are important for making a reasonable rail-centric historical map.

    For railways:
    electrified
    high speed
    usage

    Presumably these would be based on the electrified=yes, service=high_speed, and usage=* tags, respectively.

    usage would also be helpful for mitigating the recent Historic style changes that have deemphasized railways: #608 (comment). The change was apparently motivated by minor rail lines and tram lines creating information overload. usage=main could be reemphasized without crowding out other kinds of features in urban areas.

    /cc @vknoppkewetzel

  2. changed the title [-]Request to add tags[/-] [+]Add rail-centric tags to vector tiles[/+] on Nov 25, 2023
  3. Bauer33333 commented on Nov 25, 2023

    @Bauer33333

    "Presumably these would be based on the electrified=yes, service=high_speed, and usage=* tags, respectively."

    Service=high_speed describes route relations, not tracks. Afaik service can also already be used to render tiles. What he would need is highspeed=yes.
    Electrified=yes is also rare and discouraged to be used, you would usually give a value that tells the kind of electrification.

  4. jeffreyameyer commented on Dec 8, 2023

    @jeffreyameyer
    Member

    Opened up a forum discussion here - seems weird to divert from gh to a forum, but might generate some different input...

  5. jeffreyameyer commented on Jan 24, 2024

    @jeffreyameyer
    Member

    @flha127 - we've kicked off the addition of a rail-specific layer. Please be sure to see this update & this ticket: #405.

  6. danrademacher commented on Feb 16, 2024

    @danrademacher

    OK, so the specific ask here is to add these tags to the vector tiles:

    So we'd need that from @Rub21, though we've also had some concerns about overloading our tiles with too much data for tile load times/file size. I'm honestly not sure how we assess any minor addition to the tiles in terms of impact on overall map performance.

  7. Bauer33333 commented on Feb 16, 2024

    @Bauer33333

    @danrademacher Please note my comment here. The tags you mentioned where just a guess.
    What he would need are:
    electrified=*
    highspeed=yes
    and usage=*

  8. jeffreyameyer commented on Feb 28, 2024

    @jeffreyameyer
    Member

    @Bauer33333 @flha127 - there's some discussion of putting the usage=* values in OHM into the type=* values in the vector tiles. It seems electrified=* and highspeed=* might be overlapping with other type=* values. Is the current expectation be that there'd be different styling for electrified or highspeed rail lines? If so, we'd need to add different values for those.

  9. Bauer33333 commented on Feb 29, 2024

    @Bauer33333

    Having usage in the types doesn't sound the worst idea at first, since the most common rail type to use usage= is only railway=rail . Taginfo for open_street_map shows quite a few trams and stuff with usage as well, but I have no idea what this tagging is trying to describe so I would ignore those for now. Usually you would only use service= on those what doesn't introduce any conflicts here.
    I see conflicts with railway=narrow_gauge tho if we want to render usage= on them. Not sure how important that will become, nowadays (on OSM) narrow gauge rail networks have become a bit rare so you don't bother, but this looks different in a historical context.

    I would call electrified= a nice to have right now and not a must have yet, especially compared to usage=, but it would be a very nice nice to have. Maybe flha has a different opinion on this since his style is the first one I've seen combining them. On ORM they use an extra style for electrification that shows voltage= and frequency= as well.

    We could probably put highspeed= in type as well, since it is usually only used on tracks with usage=main.
    See the current situation on OSM:
    grafik
    But I would go so far and say we should not render that yet, not before we have an established guideline what highspeed rail even means in a historical context:
    Does the Lackawanna Cutoff qualify as high speed rail? If yes at which year is it considered too slow? Do we only tag modern highspeed lines as the OSM definition describes? ... Lots of open questions regarding that for me. It is not a top priority to answer them now, but I just don't feel we are there yet to render them (encouraging people to map them) without having conflicts about the definitions with those people later on

  10. flha127 commented on Mar 26, 2024

    @flha127
    Author

    Good morning,
    Sorry for this late response, I didn't see the notice.

    If I understand correctly, you would like the content of the usage tag to be put as the value of the type tag?
    If that's it then no it won't work, there should be two tags, one for the type of infrastructure rail= and the other for the use we make of it. Other types of rail= can also use this tag so this would create a conflict.
    However usage and service cover the same idea, so we can suggest abandoning usage= and using only service= or the opposite.

    The electrified tag is a must have, historically electrification is a crucial date for a line. For the moment we can make do with electrified=*, voltage= and frequency= are less important and rarely used.

    As for the modern definition of highspeed I would say a line with railway=rail+usage=main+electrified=* built from the 1950s with construction standards (as grade separation or min curve radius) allowing high speeds (let's say in the 1950s 250km/h at random) and a dedicated rolling stock.
    Historically, it would be necessary to define the construction standards and the speed from which a line can be qualified as high speed (also before the 1950s electrification was not a key factor). For the first half of the 20th century I would say that the Lackawanna Cutoff meets both conditions.

    In the same vein as highspeed= (improvement of infrastructure) a street_running= tag has its historical interest in seeing this other form of improvement. It can be implemented quite easily with:

    • for railway=rail/subway/narrow_gauge street_running as an exception tagged street_running=yes ;
    • and for railway=tram/light_rail for whom street_running is natural; the opposite with street_running=no.
  11. moved this to Data/dev work required first in OHM Cartoon Feb 12, 2025
  12. removed their assignment
    on Feb 12, 2025
  13. added theissue type on Mar 16, 2025
  14. 1ec5 commented on Apr 7, 2025

    @1ec5
    Member

    there's some discussion of putting the usage=* values in OHM into the type=* values in the vector tiles.

    If I understand correctly, you would like the content of the usage tag to be put as the value of the type tag?

    I think there was a misunderstanding. #637 (comment) was talking about type as a feature property in the tiles, after postprocessing, not in raw tags in the database. type=geometry has been picking up steam lately as part of an experimental tagging scheme, but I’d tread with caution here. type=* is a special key reserved for relations. OSM deprecated its use on ways many years ago, and a variety of data consumers and editing tools have come to treat it as an error. This is one of the few times where the OSM community and ecosystem has been so thoroughly on board with a deprecation. Rather than undo this deprecation, I suggest looking for a less ambiguous key if needed. The feature property can be type without any of those considerations.

    Going back to the original request, OpenHistoricalMap/ohm-deploy@62e368d added electrified, highspeed, service, and usage properties to the tiles as part of OpenHistoricalMap/ohm-deploy#285. Each of these properties is a pass-through for identically named keys in the database, though hiddewie/OpenRailwayMap-vector#246 (comment) makes the point that we should consider postprocessing the tags into more readily styleable properties. To reduce confusion about what’s been implemented, I’m closing this original feature request, but feel free to open a separate issue about anything more specific that we need to do in the tiles.

  15. moved this from Data/dev work required first to Done in OHM Cartoon Apr 7, 2025
  16. moved this from Todo - Known Path to Ready for Staging in OpenHistoricalMap Dev Planningon Apr 7, 2025
  17. moved this from Ready for Staging to In Production in OpenHistoricalMap Dev Planningon May 5, 2025
  18. moved this from Tested in staging to Live in production in OHM Cartoon Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions