Created
October 8, 2020 15:45
-
-
Save jatorre/ded44ab09480ae1ec5ac5fb05ee66700 to your computer and use it in GitHub Desktop.
This file contains 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
CALL cartobq.tiler.ST_PointAggregationAsMVT( | |
--SQL to use as the source (use geom as name for geography) | |
'''(SELECT ST_Centroid(geometry) as geom | |
FROM `bigquery-public-data.geo_openstreetmap.planet_layers` | |
where layer_name ='building')''', | |
--Name and location where the Tileset will be stored. Replace: | |
'`cartobq.maps.osm_buildings_weekly`', | |
--Options on how to generate the Tileset | |
'''{ | |
"zoom_max": 14, | |
"type": "quadkey", | |
"resolution": 8, | |
"placement": "cell-centroid", | |
"columns":{ | |
"aggregated_total": { | |
"function": "count", | |
"column": "*", | |
"type": "Number" | |
} | |
} | |
}'''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment