-
-
Notifications
You must be signed in to change notification settings - Fork 973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to help with public transport routing? #837
Comments
You may start from here: https://github.com/organicmaps/organicmaps/blob/master/docs/EXPERIMENTAL_PUBLIC_TRANSPORT_SUPPORT.md It would be great if more people from the community help us with public transport. It's not an easy task. There is also a great guide from OSMand how to contribute Public Transport info into OpenStreetMap: https://osmand.net/blog/guideline-pt |
Is there a reason why you just added "subway, light rail, monorail and train routes and stops" and no tram or bus routes? |
Other developers started to implement the public transport feature (subways) and did not finish it yet. We would gladly finish it with the help of the community. |
I get an ModuleNotFound Error for requests. Where do the compiler found that import?
Edit: i downloaded all python scripts, but there are far too many for me to find the missing class. Any idea? |
Haha, here you can see my lack of python knowledge. But it seams that i have an other issue, because requests is already installed. |
Fixed that other stupid issue. But the script won't work. I used the way without the omd key, mostly because their site is broken and i was not able to login. Here the log:
Looking at https://www.transit.land/ it seams that they need an API key too:
|
@csidirop Have you been able to make it work with a key? Or does the download_gtfs script need modification for it to work? |
@tannishpage no, i took a quick look at the pythonfile and didn't found any parameter for a transitland key (corrct me if i missed something). And since this requirement is new, and the file 6 months old, Im sure it needs modification. And because this exceeds my nearly non-existent python knowledge, I got nowhere. I could have a look at it this weekend if I find the time, if one of the devs hasn't taken it over by then. |
@csidirop I'll have a go at it. I've got some experience with python |
@tannishpage great! Let me know if there is something I can do |
@csidirop I made the modifications to the file and it is working now. It is downloading all the gtfs data from transitland. However, some urls on transitland are causing 403, but that's not really the scripts fault. I'll make a pull request once it finishes running and I'm sure it's not causing any issues. |
I am trying to compile the gtfs_converter.cpp file using cmake. But I keep getting this error. Am I doing something wrong? Are there any instructions on how to compile this?
|
Try to build gtfs_converter using CMakeLists.txt at the root of the project. |
@biodranik How would I do that. I've never used cmake before. |
@tannishpage updated download_gtfs.py works great under Win |
Btw, for everyone else trying that: Download can take over over an hour and needs more than 35GB. |
|
So I did When I run
Here is CMakeError.log:
I'm running Elementary OS 6. Not really sure what to do |
Did you install qt5 dev package? |
Ok, so I installed qt5 dev packages and everything worked nicely. I've generatred the json files using Step 3 is asking me to find a file called |
There is a link to the doc in my link above: https://github.com/organicmaps/organicmaps/blob/master/tools/python/maps_generator/README.md |
The public transport routing seems a little bit weird in a certain city. It just uses the metro, and the tramway is not used despite being the shorter route. Is this due to the map view called "Metro" only containing the metro lines and that is used for routing? |
Trams are not used/coded yet. |
Here is the list of OpenStreetMap metro/subways validation results: https://cdn.organicmaps.app/subway/ You can help us by fixing red metro lines directly in OpenStreetMap. Then every @organicmaps user will have an updated Public Transport map (subways and S-Bahn at the moment). Some general instructions are here: https://wiki.openstreetmap.org/wiki/Metro_Mapping And here is info how to validate a separate city: |
@contrapunctus-1 let's discuss and plan it! |
GNOME Maps uses https://transport.opendata.ch/ for Switzerland. Hopefully this'll make its way into Transportr at some point soon (see grote/Transportr#768), but it could also be used here, as it works perfectly fine in GNOME Maps. |
Hi, dnf install -y gcc g++ cmake qt5-qtbase-devel qt5-qtsvg-devel zlib-devel libicu-devel freetype-devel git python python-requests
git clone https://github.com/organicmaps/organicmaps --depth 1
cd organicmaps
git submodule update --init --recursive
./configure.sh
tools/unix/build_omim.sh -r world_feed But still $ find . -iname "gtfs_*"
./transit/world_feed/gtfs_converter
./transit/world_feed/gtfs_converter/gtfs_converter.cpp Does anyone have an end-to-end script to compile the "full public transport support". Thanks |
Dis you try to use gtfs_converter target instead? |
$ dnf install -y gcc g++ cmake qt5-qtbase-devel qt5-qtsvg-devel zlib-devel libicu-devel freetype-devel git python python-requests
$ git clone https://github.com/organicmaps/organicmaps --depth 1
$ cd organicmaps
$ git submodule update --init --recursive
$ cd transit/world_feed/gtfs_converter
$ cmake .
-- The C compiler identification is GNU 11.3.1
-- The CXX compiler identification is GNU 11.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:3 (omim_add_executable):
Unknown CMake command "omim_add_executable".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.22)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
$ cd ../../../
$ ./configure.sh
$ tools/unix/build_omim.sh -r world_feed
$ cmake transit/world_feed/gtfs_converter
CMake Error at CMakeLists.txt:3 (omim_add_executable):
Unknown CMake command "omim_add_executable".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.22)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred! |
I am able to compile it using While using the |
Just want to mention KPublicTransport here which is a C++/Qt library from the KDE project that provides (online) public transport routing. |
I am not able to execute the gtfs_converter: getting stuck by how to specify the file:///path/to/file for the dir_for_storing_feeds, result_json_dir & path_resources. See below. ./gtfs_converter --path_mapping=mapping.txt --path_mapping_edges=mapping_edges.txt --path_gtfs_feeds=dir_for_storing_feeds --path_json=result_json_dir --path_resources=./data Executing the gtfs_converter from ~/omim-build-release$ in Ubuntu 22.04. How to define those locations? "file:///path/to/file" doesn't work either: ./gtfs_converter --path_mapping=mapping.txt --path_mapping_edges=mapping_edges.txt --path_gtfs_feeds="file:///home/koenvh/Downloads/" --path_json="file:///home/koenvh/Downloads/" --path_resources="file:///home/koenvh/omim-build-release/data/" |
Solved: the correct formatting is |
Hello, I love OrganicMaps, and I'm following the question about public transport routing. I don't know if you are aware of it, but there is already an Android app called Transportr which does worldwide public transport routing based on https://github.com/schildbach/public-transport-enabler. The app development has been slowing down last years, but an ongoing effort is trying to accelerate development again grote/Transportr#852 ! So what is my point? I think that since we have a common goal, it might be appropriate to join forces: The goal is to provide efficient, up-to-date, free and privacy-friendly public transport routing! So I know, the technologies used are not the same (PublicTransportEnabler vs GTFS, Android vs Multiplatform, different licenses...). But maybe there could be some joint efforts or reflections! That's it for my ideas, I look forward to your thoughts :) |
YES!! I was following the Transportr revival, and wishing it could be integrated into OM in some way! 😄 |
public-transport-enabler (is btw also used by and written for Öffi) is written in Java. I would expect that to be a major drawback in integrating it. Maybe some kind of sharing would be possible, so to "export" a route from Transportr to OM but that needs a proper sharing format. The already linked KPublicTransport library is basically an already existing rewrite in C++/Qt (the same technology used by OM). There also exists an Android/KDE/Qt app KTrip that clones the features of Transportr/Öffi but without the nice GUI (at least the last time I checked that, installing is a bit of a pity, check this out). Anyway, it implements lots of the same APIs for querying public transport services. |
I see a number of nice suggestions to improve OrganicMaps using other opensource projects. I do think it's good to distinguish:
The main benefit of OrganicMaps is you can use it offline. As I understand it, the goal is to optimize for offline data first. Online / real-time updates add more complexity. In short, I think the path of least effort and maximum impact is to further implement and test with GTFS data. |
@biodranik
|
Creating a meta issue that links to subtasks is a good idea. Our experience and current vision of the architecture is:
There are many subtasks here, feel free to go deeper. The main goal is to make a worldwide public transport routing better than Google, that is open-source and available to everyone. Development and support can be sponsored by cities and countries, by funds, and by the community. |
Added a meta issue #5331 to collect all subtasks to implement public transport routing, please feel free to add |
Closing this issue in favor of #5331 |
All the bus, ferry and train stations are already on the map in my city, with the routes lined out. But I can't access the routing feature, it says "Subway navigation in this region is not available yet". So, what can I do to help out?
The text was updated successfully, but these errors were encountered: