Use OpenStreetMap tiles as basemaps in python / matplotlib
Project description
TileMapBase
Uses OpenStreetMap tiles, or other tile servers, to produce “basemaps” for use with matplotlib. Uses a SQLite database to cache the tiles, so you can experiment with map production without re-downloading the same tiles. Supports Open Data tiles from the UK Ordnance Survey.
Requirements
Pure python. Uses requests to make HTTP requests for tiles, and pillow for image manipulation.
Install
pip install tilemapbase
or build from source:
python setup.py install
or directly from GitHub:
pip install https://github.com/MatthewDaws/TileMapBase/zipball/master
Example
Example - Jupyter notebook showing examples.
Ordnance Survey - Ordnance survey examples.
Notebooks - Other examples.
OpenStreetMap data
OpenStreetMap Data is “© OpenStreetMap contributors”, see http://www.openstreetmap.org/copyright
Please remember that tile set usage is subject to constraints: https://operations.osmfoundation.org/policies/tiles/
As of 25/05/2019 OSM requires a user agent for all requests, with a warning “Faking another app’s User-Agent WILL get you blocked.” We hence default to using “TileMapBase” as a user agent.
Ordnance Survery data
Contains OS data © Crown copyright and database right (2017)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file tilemapbase-0.4.6.tar.gz
.
File metadata
- Download URL: tilemapbase-0.4.6.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb941140141d16ee7abae75ea5091a17bdd79cdcd9d7a40b2e75088db62f8500 |
|
MD5 | 93d62e4cdda8d91ae873d7ec859a0afc |
|
BLAKE2b-256 | aa6180c9ba45e4f33179603c8dcb8a545dcbc51de6e14b8a3ab375780d6735e6 |