comaps/subways
17
7
Fork
You've already forked subways
6

Support Tram #16

Open
opened 2025年08月28日 17:48:09 +02:00 by jeanbaptisteC · 4 comments
Contributor
Copy link

To improve transport routing before support GTFS in the app, we can add support the tram transport in the metro layer and in the routing.
Tasks:

To improve transport routing before support GTFS in the app, we can add support the tram transport in the metro layer and in the routing. Tasks: - [ ] Add support to [route=tram relation](https://wiki.openstreetmap.org/wiki/Tag:route%3Dtram) - [ ] Add tram transport to the validator
Author
Contributor
Copy link

First tasks requires:

  • update relations nodes in process_subways.sh
  • update get_cities_info method to be able to switch between different source data files

I have founded a way to test the tram validator

First tasks requires: - update relations nodes in process_subways.sh - update get_cities_info method to be able to switch between different source data files I have founded a way to test the tram validator
Author
Contributor
Copy link

To test:

Update scripts/process_subways.sh, replace:

 QRELATIONS="r/route,route_master=subway,light_rail,monorail,train r/public_transport=stop_area,stop_area_group"
 QNODES="n/railway=station,subway_entrance,train_station_entrance n/station=subway,light_rail,monorail n/subway=yes n/light_rail=yes n/monorail=yes n/train=yes"

With

 QRELATIONS="r/route,route_master=subway,light_rail,monorail,train,tram r/public_transport=stop_area,stop_area_group"
 QNODES="n/railway=station,subway_entrance,train_station_entrance,tram_stop n/station=subway,light_rail,monorail n/subway=yes n/light_rail=yes n/monorail=yes n/train=yes n/tram=yes"

Update subways/validation.py, replace 222-225

"num_stations",
 "num_lines",
 "num_light_lines",
 "num_interchanges",

With

 "num_tram_lines",
 "num_trolleybus_lines",
 "num_bus_lines",
 "num_other_lines",

Line 248, replace
cities_info_url: str = DEFAULT_CITIES_INFO_URL, overground: bool = False
With
cities_info_url: str = DEFAULT_CITIES_INFO_URL, overground: bool = True

And remove line 250-251

To test: Update scripts/process_subways.sh, replace: ``` QRELATIONS="r/route,route_master=subway,light_rail,monorail,train r/public_transport=stop_area,stop_area_group" QNODES="n/railway=station,subway_entrance,train_station_entrance n/station=subway,light_rail,monorail n/subway=yes n/light_rail=yes n/monorail=yes n/train=yes" ``` With ``` QRELATIONS="r/route,route_master=subway,light_rail,monorail,train,tram r/public_transport=stop_area,stop_area_group" QNODES="n/railway=station,subway_entrance,train_station_entrance,tram_stop n/station=subway,light_rail,monorail n/subway=yes n/light_rail=yes n/monorail=yes n/train=yes n/tram=yes" ``` Update subways/validation.py, replace 222-225 ``` "num_stations", "num_lines", "num_light_lines", "num_interchanges", ``` With ``` "num_tram_lines", "num_trolleybus_lines", "num_bus_lines", "num_other_lines", ``` Line 248, replace `cities_info_url: str = DEFAULT_CITIES_INFO_URL, overground: bool = False` With `cities_info_url: str = DEFAULT_CITIES_INFO_URL, overground: bool = True` And remove line 250-251

I would love to help on this task @jeanbaptisteC. How can I help?
Do I just try what you said in the previous message and run to see what it outputs?

I would love to help on this task @jeanbaptisteC. How can I help? Do I just try what you said in the previous message and run to see what it outputs?
Author
Contributor
Copy link

I have just doing tests to know if tram mode can be used to debug and support it
To see the output, you can check the log file
The main idea, is to able to launch the process with Rapid.csv file and/or Overground.csv only for trams and adapt the validator (errors and maybe UI on the html page generates). Rules need to respect osm rules without be too restrictive but by be able to draw a splines of the line and get differents stations of the line like it's already the case for subway or light_rail

Happy to see new contributor 😀

I have just doing tests to know if tram mode can be used to debug and support it To see the output, you can check the log file The main idea, is to able to launch the process with [Rapid.csv file](https://codeberg.org/comaps/subways/src/branch/master/source_data/Rapid.csv) and/or [Overground.csv](https://codeberg.org/comaps/subways/src/branch/master/source_data/Overground.csv) only for trams and adapt the validator (errors and maybe UI on the html page generates). Rules need to respect osm rules without be too restrictive but by be able to draw a splines of the line and get differents stations of the line like it's already the case for subway or light_rail Happy to see new contributor 😀
Sign in to join this conversation.
No Branch/Tag specified
master
jb_test
jb_lt
jb_tram
pastk-TEST-pr-62
pastk-TEST-pr-61
pastk-TEST-pr-54
pastk-TEST-pr-39
pastk-TEST-pr-41-and-39
pastk-TEST-pr-48
pastk-TEST-pr-41
pastk-TEST-pr-43
upstream
fixes-from-alexey2
fixes
No results found.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
comaps/subways#16
Reference in a new issue
comaps/subways
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?