Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brawer/osmviews-py
Python client for OSMViews, a world-wide ranking of geographic locations based on OpenStreetMap tile logs.
https://github.com/brawer/osmviews-py
openstreetmap python ranking
Last synced: 29 days ago
JSON representation
Python client for OSMViews, a world-wide ranking of geographic locations based on OpenStreetMap tile logs.
- Host: GitHub
- URL: https://github.com/brawer/osmviews-py
- Owner: brawer
- License: mit
- Created: 2022-05-05T14:17:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-10T21:29:20.000Z (over 2 years ago)
- Last Synced: 2024-10-13T14:14:43.455Z (2 months ago)
- Topics: openstreetmap, python, ranking
- Language: Python
- Homepage: https://pypi.org/project/osmviews/
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OSMViews Python Client
Python client for [OSMViews](https://osmviews.toolforge.org), a world-wide
ranking of geographic locations based on OpenStreetMap tile logs. Please
see the [main repository](https://github.com/brawer/osmviews) for background.## Usage
```python
# pip install osmviews
import osmviews
osmviews.download('/tmp/osmviews.tiff')
with osmviews.open('/tmp/osmviews.tiff') as o:
print(f'Tokyo, Shibuya: {o.rank( 35.658514, 139.701330):>9.2f}')
print(f'Tokyo, Sumida: {o.rank( 35.710719, 139.801547):>9.2f}')
print(f'Zürich, Altstetten: {o.rank( 47.391485, 8.488945):>9.2f}')
print(f'Zürich, Witikon: {o.rank( 47.358651, 8.590251):>9.2f}')
print(f'Ushuaia, Costa Este: {o.rank(-54.794395, -68.251958):>9.2f}')
print(f'Ushuaia, Las Reinas: {o.rank(-54.769225, -68.279174):>9.2f}')Tokyo, Shibuya: 227437.98
Tokyo, Sumida: 60537.62
Zürich, Altstetten: 37883.31
Zürich, Witikon: 11711.94
Ushuaia, Costa Este: 2697.14
Ushuaia, Las Reinas: 257.89
```