CxAalto / gtfspy

Public transport network analysis using Python 🚊🚇🚃🚌🛳️🚡🚠🚞
MIT License
157 stars 30 forks source link

How to run visualizer for different cities available in the dataset? #42

Open padshahrohan opened 1 year ago

padshahrohan commented 1 year ago

The script needs a gtfs zip file and osm.pbf file. The dataset has the gtfs file needed but how to get osm.pbf file?

    imported_database_path = "test_db_kuopio.sqlite"
    if not os.path.exists(imported_database_path):  # reimport only if the imported database does not already exist
        print("Importing gtfs zip file")
        import_gtfs.import_gtfs(["data/gtfs_kuopio_finland.zip"],  # input: list of GTFS zip files (or directories)
                                imported_database_path,  # output: where to create the new sqlite3 database
                                print_progress=verbose,  # whether to print progress when importing data
                                location_name="Kuopio")

        # Not this is an optional step, which is not necessary for many things.
        print("Computing walking paths using OSM")
        G = gtfs.GTFS(imported_database_path)
        G.meta['download_date'] = "2017-03-15"

        osm_path = "data/kuopio_extract_mapzen_2017_03_15.osm.pbf"

how to get the osm.pbf file, to generate the sqlite file for any given city to put it in visualizer?

rmkujala commented 1 year ago

Hi,

Try e.g. geofabrik for downloading osm data exports: https://www.geofabrik.de/data/download.html

padshahrohan commented 1 year ago

https://download.geofabrik.de/ This link contains the file continent wise files, this https://zenodo.org/record/1186215 contains the data city wise, now lets say i want to generate the sqlite file for brisbane city, what obm.pbf file i need to put in the script ?