{"id":13935956,"url":"https://github.com/mapsme/subways","last_synced_at":"2025-04-23T15:31:24.407Z","repository":{"id":113439918,"uuid":"105768684","full_name":"mapsme/subways","owner":"mapsme","description":"Subway Preprocessor and Validator","archived":false,"fork":false,"pushed_at":"2020-10-13T08:21:57.000Z","size":301,"stargazers_count":28,"open_issues_count":9,"forks_count":11,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-08-08T23:22:26.250Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mapsme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-04T12:59:31.000Z","updated_at":"2023-11-23T12:12:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f178c28-c7ae-4a42-863d-f65577335e6c","html_url":"https://github.com/mapsme/subways","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapsme%2Fsubways","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapsme%2Fsubways/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapsme%2Fsubways/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapsme%2Fsubways/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mapsme","download_url":"https://codeload.github.com/mapsme/subways/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223926874,"owners_count":17226455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-07T23:02:14.226Z","updated_at":"2024-11-10T08:10:02.466Z","avatar_url":"https://github.com/mapsme.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Subway Preprocessor\n\nHere you see a list of scripts that can be used for preprocessing all the metro\nsystems in the world from OpenStreetMap. `subway_structure.py` produces\na list of disjunct systems that can be used for routing and for displaying\nof metro maps.\n\n## How To Validate\n\n\n* Choose transport data source:\n  1. Download or update a planet file in o5m format (using `osmconvert` and `osmupdate`).\n     Run `osmfilter` to extract a portion of data for all subways. Or\n  2. If you don't specify `--xml` or `--source` option to the `process_subways.py` script\n     it tries to fetch data over [Overpass API](https://wiki.openstreetmap.org/wiki/Overpass_API). **Not suitable for whole planet or large countries.**\n* Run `process_subways.py` with appropriate set of command line arguments\n  to build metro structures and receive a validation log.\n* Run `validation_to_html.py` on that log to create readable HTML tables.\n\n## Validation Script\n\nThere is a `process_subways.sh` in the `scripts` directory. The author uses it for\nupdating both the planet and a city he's working on. Here is an example of a script\nfor updating the London Underground network:\n\n```bash\nPLANET_PATH=$HOME/osm/planet\nexport OSMCTOOLS=\"$PLANET_PATH\"\nexport PLANET=\"$PLANET_PATH/london.o5m\"\nexport HTML_DIR=tmp_html\nexport BBOX=-0.681152,51.286758,0.334015,51.740636\nexport CITY=\"London\"\nexport DUMP=london.yaml\n\nscripts/process_subways.sh\n```\n\nThe bounding box can be found in the\n[Google Spreadsheet](https://docs.google.com/spreadsheets/d/1-UHDzfBwHdeyFxgC5cE_MaNQotF3-Y0r1nW9IwpIEj8/edit?usp=sharing).\n\nThis can be simplified by using the `build_city.sh` script, which fetches the bbox from the web:\n\n    scripts/build_city.sh london.o5m London\n\nDaily updates of validation results are available at [this website](http://osm-subway.maps.me).\n\n## Adding Stop Areas To OSM\n\nTo quickly add `stop_area` relations for the entire city, use the `make_stop_areas.py` script\nfrom the `stop_area` directory. Give it a bounding box or a `.json` file download from Overpass API.\nIt would produce an JOSM XML file that you should manually check in JOSM. After that\njust upload it.\n\n## Author and License\n\nAll scripts were written by Ilya Zverev for MAPS.ME. Published under Apache Licence 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapsme%2Fsubways","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapsme%2Fsubways","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapsme%2Fsubways/lists"}