Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pramsey/minimal-mvt
Example MVT server and map for pedagogical purposes
https://github.com/pramsey/minimal-mvt
Last synced: 17 days ago
JSON representation
Example MVT server and map for pedagogical purposes
- Host: GitHub
- URL: https://github.com/pramsey/minimal-mvt
- Owner: pramsey
- Created: 2019-07-03T22:16:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-09-14T07:35:16.000Z (about 1 year ago)
- Last Synced: 2024-08-06T03:02:29.860Z (3 months ago)
- Language: Python
- Size: 15.6 KB
- Stars: 173
- Watchers: 8
- Forks: 42
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python Setup
The tile server requires a database connection, so set up a virtual environment and then install the `psycopg2` driver using `pip`.
cd minimal-mvt
virtualenv --python python3 venv
source venv/bin/activate
pip install -r requirements.txt# Configuration
Edit `minimal-mvt.py` and the `TABLE` and `DATABASE` constants:
TABLE = {
'table':'nyc_streets',
'srid':'26918',
'geomColumn':'geom',
'attrColumns':'gid, name, type'
}DATABASE = {
'user':'pramsey',
'password':'password',
'host':'localhost',
'port':'5432',
'database':'nyc'
}# Run
python3 minimal-mvt.py