4/21/201710.6k
chris.helm@digitalglobe.com
Public

Talavera Tiles Demo

Demo for the Q2 hackathon showing a package called Talavera

vectorservicestilestalavera

DigitalGlobe (Required Remote Kernel)
Some of the data for this notebook was provided by the DigitalGlobe remote kernel. You will need access to this remote kernel to be able to make full use of this notebook.

Talavera tiles on top of Vector Service Queries

Talavera lets us produce visualization from queries to vector services.

You can install it like so:

!pip install git+https://github.com/DigitalGlobe/talavera.git > pip.txt 2>&1
    
# ugg, why google? ...
!touch /anaconda/envs/juno/lib/python2.7/site-packages/google/__init__.py

AWS Creds are required to cache data

you can create them like so (it be nice to make this a ENV VAR ui in RADD)

%%bash
mkdir ~/.aws
key="YOUR AWS KEY"
secret="YOUR ACCESS SECTRET"
printf "[dg]\naws_access_key_id = $key\naws_secret_access_key = $secret\nregion = us-east-1" > ~/.aws/credentials
from talavera import seed, tilemap

# Denver OSM Buildings
query = 'ingest_source:OSM AND item_type:Building' 
bbox = [-105.016079, 39.733792, -104.971361, 39.762367]

We can directly seed a cache

Using and AOI and a query we can seed zoom levels. This is just helpful for development.

seed(bbox, query, zooms=range(5,16), force=False)
200 5 6 12
200 6 13 24
200 7 26 48
200 8 53 97
200 9 106 194
200 10 213 388
200 11 426 777
200 12 853 1554
200 13 1706 3108
200 13 1706 3109
200 13 1707 3108
200 13 1707 3109
200 14 3412 6216
200 14 3412 6217
200 14 3412 6218
200 14 3413 6216
200 14 3413 6217
200 14 3413 6218
200 14 3414 6216
200 14 3414 6217
200 14 3414 6218
200 15 6825 12433
200 15 6825 12434
200 15 6825 12435
200 15 6825 12436
200 15 6826 12433
200 15 6826 12434
200 15 6826 12435
200 15 6826 12436
200 15 6827 12433
200 15 6827 12434
200 15 6827 12435
200 15 6827 12436
200 15 6828 12433
200 15 6828 12434
200 15 6828 12435
200 15 6828 12436
200 15 6829 12433
200 15 6829 12434
200 15 6829 12435
200 15 6829 12436

Visualization

I've created a way to view tiles based on any query. Its semi-configurable and support feature extrusion.

tilemap(query, zoom=14, lon=-104.993720, lat=39.748048)