Created
January 2, 2017 12:22
-
-
Save ustroetz/7e4c4f699f9604972f512ddd3bdd1a0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mapbox_vector_tile | |
import requests | |
tile_id = 'allryder.ama_districts-staging' | |
url = 'https://a.tiles.mapbox.com/v4/' + tile_id + '/10/531/341.vector.pbf' | |
querystring = {"access_token":"pk.eyJ1IjoiYWxscnlkZXIiLCJhIjoidWs5cUFfRSJ9.t8kxvO3nIhCaAl07-4lkNw"} | |
response = requests.request("GET", url, params=querystring) | |
data = mapbox_vector_tile.decode(response.content) | |
feature_properties = data['ama_districts-staging']['features'][0]['properties'] | |
print feature_properties['name'] | |
print feature_properties['parent_id'] | |
print feature_properties['type'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment