ERROR when using GTFS to spatialite
Art-Ev opened this issue · comments
Purpose of use
Are you reporting something you found during a research project, consulting/professional project or personal project?
Is that a funded project?
Find during personal project (during 2020 I think but cannot remember) but also impact professional and educational projects
Describe the bug
Python error when using the GTFS -> Spatialite functionality (Launch through AequilibraE GUI but I think it could be library related).
Provided GTFS is a bit large and use crazy numbers as route_id but same error occur with small GTFS. Small GTFS (cannot be provided) developp during a project and validate with Google validator lead to same error, message error only differ by the route_id ("330101" instead of "11821949021891899").
Also as route_text_color is an optionnal field, what happened if he is not present in route.txt ?
To Reproduce
Steps to reproduce the behavior:
-
Launch GTFS to spatialite (for example with the provided GTFS : tisseo_gtfs.zip )
-
Wait for process...
-
error :
WARNING Traceback (most recent call last):
File "%appdata%/Roaming/QGIS/QGIS3\profiles%profile_name%/python/plugins\AequilibraE
public_transport_procedures\gtfs_import_dialog.py", line 198, in run
self.run_thread()
File "%appdata%/Roaming/QGIS/QGIS3\profiles%profile_name%/python/plugins\AequilibraE
public_transport_procedures\gtfs_import_dialog.py", line 154, in run_thread
self.worker_thread.import_gtfs()
File "%appdata%\Roaming\QGIS\QGIS3\profiles%profile_name%\python\plugins\AequilibraE
aequilibrae\aequilibrae\transit\gtfs\gtfs_sqlite_db.py", line 261, in import_gtfs
self.__create_geometry()
File "%appdata%\Roaming\QGIS\QGIS3\profiles%profile_name%\python\plugins\AequilibraE\aequilibrae
aequilibrae\transit\gtfs\gtfs_sqlite_db.py", line 576, in __create_geometry
"SELECT route_text_color from routes where cast(route_id as text)='" + str(route_id) + "'"
sqlite3.OperationalError: near "11821949021891899": syntax error
Desktop (please complete the following information):
- OS: Windows 10
- Python version : 3.7
Don't know exactly where to put this but this is an example for frequency aggregation of a GTFS base on a date.
GTFS "network" is created from the connection between stops (stops can be merge based on name, prefix or distance) and contain frequencies. Can be used for the creation of a future PT assignment process :
https://github.com/MIERUNE/GTFS-GO/blob/master/gtfs_parser/__main__.py
Good resource! I have been working on the network data model for Polaris (a project of Argonne National Laboratory) for some time, so there are a few ideas I will be able to bring across too whenever I have some time!
The new importer solved this issue