Skip to content

Instantly share code, notes, and snippets.

@mbforr
Created September 23, 2022 17:12
Show Gist options
  • Save mbforr/25e395e020d51f89d0c2e8b0d610fa9a to your computer and use it in GitHub Desktop.
Save mbforr/25e395e020d51f89d0c2e8b0d610fa9a to your computer and use it in GitHub Desktop.
CALL `carto-un`.carto.CREATE_TILESET(
R'''(
select id, all_tags, st_geogpoint(longitude, latitude) as geom from bigquery-public-data.geo_openstreetmap.planet_nodes
)
''',
R'''`project.dataset.osm_nodes_tiles_17_and_down`''',
STRUCT(
"OSM Nodes" AS name,
"OSM nodes raw data for zooms 17 and below" AS description,
NULL AS legend,
17 AS zoom_min,
20 AS zoom_max,
"geom" AS geom_column_name,
NULL AS zoom_min_column,
NULL AS zoom_max_column,
1024 AS max_tile_size_kb,
"RAND() DESC" AS tile_feature_order,
true AS drop_duplicates,
R'''
"custom_metadata": {
"version": "1.0.0",
"layer": "layer1"
}
''' AS extra_metadata
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment