Skip to content

Instantly share code, notes, and snippets.

@mbforr
Created September 23, 2022 17:13
Show Gist options
  • Save mbforr/acee3b3778da073c399ff43e6c358a21 to your computer and use it in GitHub Desktop.
Save mbforr/acee3b3778da073c399ff43e6c358a21 to your computer and use it in GitHub Desktop.
CALL `carto-un`.carto.CREATE_POINT_AGGREGATION_TILESET(
R'''(
select id, st_geogpoint(longitude, latitude) as geom from bigquery-public-data.geo_openstreetmap.planet_nodes
)''',
'`project.dataset.osm_nodes_points_17`',
R'''
{
"zoom_min": 0,
"zoom_max": 17,
"aggregation_resolution": 7,
"max_tile_size_strategy": "drop_fraction_as_needed",
"aggregation_placement": "cell-centroid",
"properties": {
"aggregated_total": {
"formula": "COUNT(*)",
"type": "Number"
}
}
}
''');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment