PTNA: news for Public Transport Network Analysis

That seems sufficient for now - there might be a few that this misses, but will request an update if/when that becomes apparent.

Something to note is that the “National Rail” network spans the entirety of the island of Great Britain, so expanding to cover the whole island at some point could be on the cards, but you’ll know better than me whether that’s best handled in one big PTNA region or multiple smaller PTNA regions.

Yeah, that would have been my next question, but 1 AM was quite late to ask. This fact has an impact on the name of the analysis, so I’d call it GB-National_Rail (note the underscore, which cannot be a hyphen for internal reasons) and let it span … you write: “the whole island”, is this GB w/ or w/o Northern Irland?

Please excuse, I’m not so familiar with the differences between “Great Britain” and the “United Kingdom”, is there any?

In this case, that analysis should cover the whole area of the ‘network’.
Will that cover all train-based traffic in GB.

The first train-only analysis was DE-Bahnverkehr and this is a very, very huge HTML file. Could have been (and still can be) split into 1+16 files for long-distance trains and 16 regional files for the 16 federal states of DE.

  • long-distance trains are operated by DB and others on their own risk.
  • regional traffic is in the hands of the 16 state governments. They define which connections they want and organise tenders to find operators which then get paid for the service.

We now follow this approach for FR, where PTNA has FR-SNCF (long-distance) and some FR-*-TER for the 9 13 regions.

For smaller countries however, like NL, IL, EE, … it’s ok to have a single train-only analysis. For US-Amtrak it is also ok, because of the low density, amount of routes.

National is the group for representing passanger train operation companies of England, Scotland Wales. The rail network of Northern Ireland is not part of the national rail network, moreover it even has a different gauge.

1 Like

Thanks, so calling it GB-National_Rail is ok even if the search area includes Northern Ireland?

TIL: so “GB” here as the ISO code stands for “United Kingdom of Great Britain and Northern Ireland”

United Kingdom = The 4 constituent countries (Scotland, England, Northern Ireland and Wales)

Great Britain = The island that contains most of Scotland, England and Wales.

Ireland = The island that contains most of Northern Ireland and the Republic of Ireland.

The British Isles = Great Britain + Ireland + all of the nearby small islands from the all the way up to Orkney (and Shetland?), spanning Scotland, England, Wales, Northern Ireland and the Republic of Ireland.

It’s more complicated than that, but that’s the gist of it. Check out the relevant CGP Grey video on youtube to see how far the rabbit hole goes.


As such, Northern Ireland should be excluded from the search area. I think the only other island in the UK that has a train network is the Isle of Wight. I think this also comes under the National Rail umbrella, but I could be mistaken.

If splitting National Rail into chunks, I’d say London and the Scottish Central Belt (Glasgow-Edinburgh) need to be their own chunks. After that, you could probably get away with a North Scotland, South Scotland, NW England, NE England,

London (Overground is National Rail, Underground is a separate network AFAIK) and Glasgow (Subway is separate network - covered already in PTNA by GB-GLG-SPT) have very dense urban rail networks, but the rest of the cities have much simpler rail networks, with a greater focus on intercity travel by rail.

Thanks, I think I got confused by license plate and ISO code “GB” != “Great Britain”.

And then there are the “Isle of Man”, “Jersey”, “Guernsey”, … “from a distance, it all looks the same?”

Yeah, would probably be the best support for local mappers: having small, local reports.
What about:

  • GB-LND-Nation-Rail (ISO 3166-2 for London)
  • GB-SCT-S-National-Rail (ISO 3166-2 for Scotland + “South”)
  • GB-SCT-N-National-Rail (ISO 3166-2 for Scotland + “North”)
  • GB-SCT-CB-National-Rail (ISO 3166-2 for Scotland + “Central Belt”)
  • GB-ENG-NE-National-Rail (ISO 3166-2 for England + “North-East”)
  • GB-ENG-NW-National-Rail (ISO 3166-2 for England + “North-West”)

ISO 3166-2:GB - Wikipedia and then find out which “second-level subdivisions” belong to each of them - just to find a list of wikidata items for the search with Overpass-API.

Based on the discussion above, I just added analysis support for public-transport data of osm to ptna for

Based on suggestions by @donmac703, I released some small new features

  • for the comparison of GTFS route vs OSM route_master and GTFS trip vs OSM route
    • allow injection of
      • GTFS’ ‘route_color’ into OSM ‘colour
      • GTFS’ ‘route_text_color’ into OSM ‘colour:text
  • in the PTNA report
    • allow injection of
      • roundtrip=yes’ or ‘roundtrip=no’ into the OSM ‘route’ if PTNA reported this as missing or wrong
      • public_transport:version=2’ into the OSM ‘route’ if PTNA reported this as missing or wrong

Hi Toni,

Thanks for doing this.
However, it keeps suggesting to inject the colours, even though they already exist.

Thanks,
Don

Thanks Don,

Argh, a tiny bug, because the GTFS route_color could be ‘052654’ while the OSM colour is ‘#052654’.
GTFS does not specify the ‘#’. PTNA detects a difference and suggests overwriting it.

I’ll fix that later.

Regards
Toni

1 Like

Inspired by a question in Réseau de Bus Le Havre - Normandie - Forum OSM France, I just added analysis support for public-transport data of osm to ptna for

On request by @dzamper, I just renamed the analysis of public-transport data of osm in ptna from

Would it be possible to sanitize the color values in the GTFS feed, for some reason there is a space in between the comma and the hex value. Example below

route_id,agency_id,route_short_name,route_long_name,route_desc,route_type,route_url,route_color,route_text_color
1-1,RTC,1,,Station Belvédère - Gare fluviale / Cap-Blanc,3,https://www.rtcquebec.ca/Default.aspx?tabid=95&noParcours=1, 013888, FFFFFF

Yes, sure and done.

You’ve got a fresh GTFS feed as of 2026-03-09.

2 Likes