Displaying track class #168
Replies: 9 comments
-
OSM2PGSQL doesn't expose any coordinates in Lua unfortunately, so processing can't happen in the lua import file |
Beta Was this translation helpful? Give feedback.
-
We could define a lookup table in Postgres with country polygons, either statically / hardcoded or from some official source. That could give all features on the map a country code. Indeed Lua could not process that unfortunately. One thing that crosses my mind is that there can be cross-border track segments which still use signalling / speed limits of the neighboring country. Those cannot be determined automatically from country polygons.
Reading https://wiki.openstreetmap.org/wiki/Key:railway:track_class#Track_class_in_the_USA_and_Canada, and the wiki page, you would also need Viewing https://taginfo.geofabrik.de/north-america:us/keys/railway:track_class#combinations and https://taginfo.openstreetmap.org/keys/railway:track_class#combinations shows ~47% have both tags globally, but only 2% in the US. And for the tracks with
Comparing the table for the US and Canada, it seems only class 5 for passenger trains has a different max speed value. It looks feasible to assume them the same and avoid a lot of complexity. Also https://taginfo.openstreetmap.org/keys/railway:track_class#map shows almost only track_class mapping in the US, almost nothing in Canada. So using the US max speed value for class 5 rail for passenger trains seems sensible. So from my point of view:
|
Beta Was this translation helpful? Give feedback.
-
Of course those segments are exceptions. It would be hard to discern them to the proper country.
I agree with that. I have made an edit to the wiki to reflect that
As freight traffic is predominant compared to passenger traffic, it could be safe to assume that freight traffic would be what is most likely expected. This would require consultations with the community to be certain. Of course, both values could be added to the info popup
There are a lot more mappers down in the US compared to Canada. The information isn't always easy to find, nor available to the public. Assuming the same values up to Class 4 sounds good as to simplify things. I'm not so sure as to how to handle Class 5 for passenger traffic.
Given that European usages of the tag are a letter and number combination, it would be safe to assume that any value which is only a number has to be either the US or Canada. We can also assume that classes 1-4 are the same values. Class 5+ would require more thought |
Beta Was this translation helpful? Give feedback.
-
This is not entirely the case. Tight curve radii, among other factors, often lower a track segment's speed limit below the maximum dictated by its class. |
Beta Was this translation helpful? Give feedback.
-
Thanks for that precision. Yes, A tagged maxspeed should definitely always take precedence over the maxspeed defined by the track class |
Beta Was this translation helpful? Give feedback.
-
I built #148 to import and display the track class on the map. There is no automatic derivation of speed values from the track class values yet. |
Beta Was this translation helpful? Give feedback.
-
Hi, I saw that in the legend there's a class named DL, but there's no way with that tag in the world. Is that a typo for D4L? A track class that is very common in Italy. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the comment, that is indeed a typo. The list of supposed track classes should come from https://wiki.openstreetmap.org/wiki/Key:railway:track_class exactly as documented for the North America and Europe classes. I will make a fix. |
Beta Was this translation helpful? Give feedback.
-
Track class has been implemented with #148. I will convert this issue to a discussion to further discuss the auto-determination of maxspeed values on tracks based on the track class. If there is agreement how to handle the different countries and traffic mode in the discussion, we can implement it. |
Beta Was this translation helpful? Give feedback.
-
This is another (mostly) North American tag for railways
In North America, track classes is a system of classification for track quality. The class of a section of track determines the maximum possible running speed limits.
In Europe, it is the class of axle load and metre load as of the EN15528 directive.
https://wiki.openstreetmap.org/wiki/Key:railway:track_class
In our North American rail tagging, tagging the track class can replace tagging the
maxspeed
.Since the speeds associated with track classes are not consistent across North America, a 1:1 conversion of track class to max speed needs to be done using lookup tables, which could be done by leveraging lua.
Based on the way's centroid and predefined BBOXes per-country we could map the track class to maxspeed.
I want to make sure that this approach is reasonable and would be okay
Beta Was this translation helpful? Give feedback.
All reactions