{"id":15202962,"url":"https://github.com/astrosat/cosmos","last_synced_at":"2026-03-11T14:12:02.227Z","repository":{"id":62564971,"uuid":"82551072","full_name":"astrosat/cOSMos","owner":"astrosat","description":"cOSMos package for OSM data retrieval","archived":false,"fork":false,"pushed_at":"2018-02-08T10:35:16.000Z","size":683,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T07:18:23.204Z","etag":null,"topics":["gis","openstreetmap","openstreetmap-data","osm","overpass-api","remote-sensing"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astrosat.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}},"created_at":"2017-02-20T11:34:36.000Z","updated_at":"2021-01-18T09:37:26.000Z","dependencies_parsed_at":"2022-11-03T16:00:47.842Z","dependency_job_id":null,"html_url":"https://github.com/astrosat/cOSMos","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/astrosat%2FcOSMos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrosat%2FcOSMos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrosat%2FcOSMos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrosat%2FcOSMos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astrosat","download_url":"https://codeload.github.com/astrosat/cOSMos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241982637,"owners_count":20052535,"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":["gis","openstreetmap","openstreetmap-data","osm","overpass-api","remote-sensing"],"created_at":"2024-09-28T04:07:47.648Z","updated_at":"2026-03-11T14:12:02.185Z","avatar_url":"https://github.com/astrosat.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cOSMos package for OSM data retrieval\n**cOSMos** is a thin wrapper for [OSM overpass API](http://wiki.openstreetmap.org/wiki/Overpass_API) that provides a number of helper functions to make downloading particular Open Street Map data easier. It allows to extract common features of interest (road networks, city locations, building footprints) based on location name.\n\n# Install\n```bash\npip install cosmos-osm\n```\n\n# Using from shell\nLocation defined on instantiation.\n```python\nfrom cosmos import Data\n\ndata = Data('Krakow')\n\nroads = data.get('roads', format='geojson')\n```\n\nLocation passed as argument.\n```python\nfrom cosmos import Data\n\ndata = Data()\n\ncities = data.get('cities', 'Scotland', format='geojson')\nroads = data.get('roads', 'Kuala Lumpur', format='geojson')\n```\n\nLocation defined by bbox.\n```python\nsouth = 47.3202203,\nwest = 8.4480061\nnorth = 47.4346662\neast = 8.6254413\nzurich = (south, west, north, east)\n\n# Without format argument it will return 2 generators with geometries and tags.\nbuildings, tags = data.get('buildings', bbox=zurich)\n```\n\n# Using from command line\nFrom terminal:\n```bash\ncosmos --location=Musselburgh --filename=musselburgh_roads.geojson\n```\nWill create musselburgh_roads.geojson GeoJSON file with road network for Musselburgh. Here's `--help` output:\n```bash\nUsage: cosmos [OPTIONS]\n\nOptions:\n  --location TEXT                 input location name(city, country)\n  --filename TEXT                 output file name\n  --dtype [roads|cities|buildings]\n                                  data type\n  --bbox \u003cFLOAT FLOAT FLOAT FLOAT\u003e...\n                                  bbox in form (south, west, north, east)\n  --help                          Show this message and exit.\n```\n\n# Data types\nCurrently implemented data types than can be extracted with **cOSMos**\n\n| Name | Geometry | Example |\n|------|----------|---------|\n| Roads| LineString| `data.get('roads', 'London')`|\n| Cities| Point | `data.get('cities', 'Portugal')`|\n| Buildings | Polygon | `data.get('buildings', 'Prague')`|\n\n# Dependencies\ncOSMos uses a number of awesome python packages, please check their websites:\n\n* [geopy](https://github.com/geopy/geopy)\n* [python-geojson](https://github.com/frewsxcv/python-geojson)\n* [click](http://click.pocoo.org/5/)\n* [requests](http://docs.python-requests.org/en/master/)\n* [shapely](http://toblerity.org/shapely/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrosat%2Fcosmos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrosat%2Fcosmos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrosat%2Fcosmos/lists"}