wipfli / esa-worldcover-polygons

Polygons based on the ESA Worldcover dataset
https://wipfli.github.io/esa-worldcover-polygons/
MIT License
6 stars 3 forks source link

Replace single water layer with natural earth data #4

Closed rene-mueller closed 7 months ago

rene-mueller commented 8 months ago

Remove generation of water layer and add natural earth data instead.

possibly the following articles can help as well:

In association with: https://github.com/onthegomap/planetiler/issues/9

wipfli commented 8 months ago

Sounds like a good idea to have better water outlines. I think the Meta map style also has some nice bathymetry so it might be worth asking them how they did it...

rene-mueller commented 8 months ago

That's right. I've read that they also use naturalearthdata. The advantage of naturalearthdata is that it does not require attribution. :)

rene-mueller commented 7 months ago

@wipfli with the styling it can be done like this: https://docs.mapbox.com/mapbox-gl-js/example/style-ocean-depth-data/

rene-mueller commented 7 months ago

@wipfli what do you think about my first result:

grafik
wipfli commented 7 months ago

I think it looks beautiful

rene-mueller commented 7 months ago

@wipfli i have only one problem:

When the poligons merge, the following happens: Data:

grafik

Data with style:

grafik

You can inspect the data and style here: https://maps.rene-mueller.xyz/styles/landcover/

Can you eventually help?

msbarry commented 7 months ago

Looks like the issue is that the bathymetry polygons are sorted randomly. Best would be to sort them in the tiles by using setSortKey(depth) on the polygons to draw deeper ones on top of shallower ones. You could also do it client-side by adding layout: {'fill-sort-key': ['get', 'depth']} but doing it at generation time would save some work on the client.

rene-mueller commented 7 months ago

@msbarry thank you, it worked :)