Skip to content

globallandcover layer is 'missing' #203

Open
@carlos-mg89

Description

@carlos-mg89

Right now, and as far as I've tested, the overall results are astounding compared to the original OpenMapTiles generator. I'm really happy with the output MBTiles.

However, there's an important layer missing, globallandcover.

The thing is that it isn't part of the OpenMapTiles generator: https://github.com/openmaptiles/openmaptiles

However, if you want to have a great user experience, it's one important layer since it displays grass, forest, tree, scrub and ice for lower zooms (between 0 and 9). Apparently, these aren't included in the output MBTiles, neither in the one from tilemaker, nor in the one from OpenMapTiles project.

So I believe it's because the people from OpenMapTiles decided it was something they didn't want to include. Which is totally fair from their side. They are a company and they have already provided with lots of awesome tools.

I believe it should be possible to generate this layer with the data mentioned above. This is the part related to this layer, in a JSON style:

{
      "id": "globallandcover_grass",
      "type": "fill",
      "paint": {
        "fill-color": "rgba(222, 226, 191, 1)",
        "fill-opacity": {
          "stops": [
            [
              8,
              0.6
            ],
            [
              9,
              0.2
            ]
          ]
        }
      },
      "filter": [
        "all",
        [
          "==",
          "class",
          "grass"
        ]
      ],
      "layout": {
        "visibility": "visible"
      },
      "source": "openmaptiles",
      "maxzoom": 9,
      "minzoom": 0,
      "source-layer": "globallandcover"
    },
    {
      "id": "globallandcover_scrub",
      "type": "fill",
      "paint": {
        "fill-color": "rgba(202, 214, 166, 1)",
        "fill-opacity": 1
      },
      "filter": [
        "all",
        [
          "==",
          "class",
          "scrub"
        ]
      ],
      "layout": {
        "visibility": "visible"
      },
      "source": "openmaptiles",
      "maxzoom": 9,
      "minzoom": 0,
      "source-layer": "globallandcover"
    },
    {
      "id": "globallandcover_tree",
      "type": "fill",
      "paint": {
        "fill-color": "rgba(191, 202, 155, 1)",
        "fill-opacity": 1
      },
      "filter": [
        "all",
        [
          "==",
          "class",
          "tree"
        ]
      ],
      "layout": {
        "visibility": "visible"
      },
      "source": "openmaptiles",
      "maxzoom": 9,
      "minzoom": 0,
      "source-layer": "globallandcover"
    },
    {
      "id": "globallandcover_forest",
      "type": "fill",
      "paint": {
        "fill-color": "rgba(191, 202, 155, 1)",
        "fill-opacity": 1
      },
      "filter": [
        "all",
        [
          "==",
          "class",
          "forest"
        ]
      ],
      "layout": {
        "visibility": "visible"
      },
      "source": "openmaptiles",
      "maxzoom": 9,
      "minzoom": 0,
      "source-layer": "globallandcover"
    },
    {
      "id": "globallandcover_ice",
      "type": "fill",
      "paint": {
        "fill-color": "rgba(255, 255, 255, 1)",
        "fill-opacity": 1
      },
      "filter": [
        "all",
        [
          "==",
          "class",
          "snow"
        ]
      ],
      "layout": {
        "visibility": "visible"
      },
      "source": "openmaptiles",
      "maxzoom": 9,
      "minzoom": 0,
      "source-layer": "globallandcover"
    }

You can observe that the source is the same one, "openmaptiles", but not the layer. The sources that are in the JSON style that MapTiler provides are these ones:

"sources": {
    "contours": {
      "url": "http://www.your-server.local/js/contours.json",
      "type": "vector"
    },
    "landcover": {
      "url": "https://api.maptiler.com/tiles/landcover/tiles.json?key=YOUR_API_KEY",
      "type": "vector"
    },
    "hillshades": {
      "url": "http://www.your-server.local/js/hillshades.json",
      "type": "raster",
      "tileSize": 256
    },
    "openmaptiles": {
      "url": "http://www.your-server.local/js/openmaptiles_base_tiles.json",
      "type": "vector"
    }
  }

The one that includes the PBFs that have the globallandcover layer, are in landcover. The landcover layer doesn't seem to have that data as I've investigated, but I'm not entirely sure about it.

More info here: https://cloud.maptiler.com/tiles/landcover/

P.S. I'll keep researching about this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions