Open bdon opened 8 months ago
The more OSM-y / Tilezen-y kind
values might be (which already in Tilezen have both detailed and generic aggregations and segmentations), where (data value), blog label > proposed Tilezen kind
value:
urban_area
farmland
grassland
scrub
barren
(was initially desert
barren
barren
for low zoom consolidation of detailed classes, so fair gameforest
glacier
(these are glaciers and permanent snow fields)Then on zoom-in, the OSM data can be used instead, with the current OSM derived value moving to kind_detail, and these rollup values used for kind?
In the blog post another class was also mentioned, but the download doesn't have it:
wetland
or water
???
See also:
@nvkelso desert might be not ideal for esa's "Bare / sparse vegetation" because this landcover type is not only used in real deserts like the Sahara, but also wet mountain areas. For example, the Alps go from "Grass" to "Bare / sparse vegetation" to "Snow and Ice" with increasing altitude...
Hey folks I gave the Daylight landcover data a try even before we have it integrated properly. If anyone wants to follow along, here's how to get it into a .pmtiles file and the cevtor tiles styled on a Maplibre map.
Download the shapefile
$ aws s3 sync s3://daylight-openstreetmap/landcover/ . --no-sign-request
Convert to GeoJSON to check it out and to convert it to a .pmtiles file later on
$ ogr2ogr -f GeoJSON landcover.geojson low.shp
$ jq '.features[].properties.class' landcover.geojson | sort | uniq
"barren"
"crop"
"grass"
"shrub"
"snow"
"trees"
"urban"
Use tippecanoe to convert the GeoJSON file to a .pmtiles file
$ tippecanoe -o landcover.pmtiles -zg -n "Daylight Landcover" -N "https://daylightmap.org/2023/10/11/landcover.html" landcover.geojson
Host the .pmtiles on a static host; I have S3 + Cloudfront set up but your use-case might differ
aws s3 cp --cache-control 'public, max-age=30758400, immutable' --content-type 'binary/octet-stream' landcover.pmtiles s3://.../20231024/landcover.pmtiles
Add the source to a Maplibre map and style the landcover layer based on the landcover classes from above.
sources: {
landcover: {
type: "vector",
url: "pmtiles://https://example.com/landcover.pmtiles",
attribution: "<a href='https://daylightmap.org/2023/10/11/landcover.html'>Daylight</a>" },
maxzoom: 8,
},
map.addLayer({
id: "landcover",
type: "fill",
source: "landcover",
"source-layer": "landcover",
maxzoom: 10,
layout: {},
paint: {
"fill-opacity": [
"interpolate",
["linear"],
["zoom"],
0, 0.5,
10, 0
],
"fill-color": ["case",
["==", ["get", "class"], "barren"], "#a48137",
["==", ["get", "class"], "crop"], "#efc52e",
["==", ["get", "class"], "grass"], "#afe57f",
["==", ["get", "class"], "shrub"], "#dbf4c2",
["==", ["get", "class"], "snow"], "#f1eff7",
["==", ["get", "class"], "trees"], "#1c4321",
["==", ["get", "class"], "urban"], "#f1eff7",
"#ffffff"]
},
}, "physical_line_waterway_label"); // before first label layer
Results look as follows - I'm not a designer tho, please no hate :stuck_out_tongue:
Our approach here will start small:
layer
called landcover
(that will complement the existing landuse
layer).
landuse
layer to the new landcover
layer as that would be a breaking change.
Other data reviewed include:
Tileset part merged in tiles 3.5.0; TODO style additions
Meta is sun-setting the Daylight distribution in favor of Overture Maps
https://daylightmap.org/2024/05/03/sunsetting-daylight.html
If we want to use their landcover data we now need to check out the Overture Maps data.
We have this mirrored at https://r2-public.protomaps.com/datasets/daylight-landcover.gpkg , and don't expect the data to change quickly, so we should be isolated from this deprecation for a while... if/when we need to improve the data we can use a from-scratch ESA generated tileset or Overture.
Description We want a landcover layer at low zooms from https://daylightmap.org/2023/10/11/landcover.html
Screenshots Here are some rough previews:
@nvkelso should we put the 7 daylight landcover classes into https://tilezen.readthedocs.io/en/latest/layers/ or invent new kind values?
Barren / Snow / Crop / Shrub / Grass / Forest / Urban