• Stars
    star
    177
  • Rank 215,985 (Top 5 %)
  • Language
    Python
  • Created over 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Example MVT server and map for pedagogical purposes

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