Tiled weather maps

You can get tiled weather maps in available parameters:

  • humidity – relative humidity;
  • prec – the amount of precipitation (in millimeters);
  • pressureMm– atmospheric pressure for this hour;
  • snowDepth – depth of snow cover;
  • soilMoisture – soil moisture;
  • soilTemperature – average soil temperature;
  • surfaceTemperature– average surface temperature;
  • temperature – average temperature;
  • waterTemperature – average water temperature;
  • windSpeed– wind speed;

Timeline

Firstly get information about the available time points for which you can get tiles. In the time field an ISO file is used, which includes information about the timezone. The list of such steps is called a "Timeline".

Request example:



{
  tiles(request: { lat:  52.37175, lon: 4.89358 }) {
    temperature {
      steps {
        genTime

        time
        timestamp

        bounds {
          lat { min max }
          lon { min max }
        }

        resolution { x y }

        value
      }
    }
  }
}

Response:

{
  "data": {
    "tiles": {
      "temperature": {
        "steps": [
          {
            // Time of map generation (gen_time).
            // This value is needed to synchronize map tiles.
            // Is a required parameter in tile requests.
            "genTime": "1673948778",

            // Step time in ISO format.
            "time": "2023-01-15T10:00:00+01:00",

            // Step time (for_date).
            // Is a required parameter in tile requests.
            "timestamp": "1673773200",

            // Bounds for which tiles are available.
            "bounds": {
              "lat": {
                "min": -90,
                "max": 90
              },
              "lon": {
                "min": -180,
                "max": 180
              }
            },

            // Resolution of pixel in degrees.
            "resolution": {
              "x": 0.02,
              "y": 0.02
            },

            // Step value of the parameter at this point.
            "value": 5
          }
        ]
      }
    }
  }
}

Tiles

After the timeline is requested, you can get the tiles:

https://api.meteum.ai/raster-maps/temperature/tile?x={x}&y={y}&z={z}&for_date=1673773200&gen_time=1673948778

The endpoint returns tiled maps and requires the following parameters in the request:

  • for_date – step timestamp;
  • gen_time – generation timestamp.

The following optional parameters are also supported:

  • proj – tile projection, EPSG:3395 (default) and EPSG:3857 are supported.

Example of using raster maps in codesandbox.io, just paste your tokens into variables.

Tile palettes

The palette is set through N pairs (value, color). Please note that intermediate values are calculated using linear interpolation and do not include the values of the next row.

  1. humidity
    Palette { Value: 0 Color: { Red: 171 Green: 108 Blue: 55 } }
    Palette { Value: 30 Color: { Red: 174 Green: 111 Blue: 56 } }
    Palette { Value: 50 Color: { Red: 98 Green: 174 Blue: 69 } }
    Palette { Value: 80 Color: { Red: 56 Green: 158 Blue: 174 } }
    Palette { Value: 100 Color: { Red: 56 Green: 71 Blue: 116 } }
    
  2. prec
    Palette { Value: 0 Color: { Red: 101 Green: 59 Blue: 10 } }
    Palette { Value: 5.0 Color: { Red: 233 Green: 204 Blue: 188 } }
    Palette { Value: 10.0 Color: { Red: 255 Green: 255 Blue: 255 } }
    Palette { Value: 15.0 Color: { Red: 148 Green: 176 Blue: 213 } }
    Palette { Value: 25.5 Color: { Red: 3 Green: 87 Blue: 142 } }
    
  3. pressureMm
    Palette { Value: 525 Color: { Red: 250 Green: 249 Blue: 155 } }
    Palette { Value: 613 Color: { Red: 221 Green: 237 Blue: 117 } }
    Palette { Value: 678 Color: { Red: 108 Green: 205 Blue: 105 } }
    Palette { Value: 703 Color: { Red: 32 Green: 173 Blue: 151 } }
    Palette { Value: 734 Color: { Red: 3 Green: 125 Blue: 171 } }
    Palette { Value: 755 Color: { Red: 46 Green: 44 Blue: 145 } }
    Palette { Value: 780 Color: { Red: 33 Green: 12 Blue: 44 } }
    
  4. snowDepth
    Palette { Value: 0 Color: { Red: 91 Green: 107 Blue: 132 } }
    Palette { Value: 2 Color: { Red: 55 Green: 172 Blue: 255 } }
    Palette { Value: 10 Color: { Red: 127 Green: 224 Blue: 255 } }
    Palette { Value: 50 Color: { Red: 195 Green: 244 Blue: 255 } }
    Palette { Value: 250 Color: { Red: 255 Green: 255 Blue: 255 } }
    Palette { Value: 500 Color: { Red: 255 Green: 255 Blue: 255 } }
    
  5. soilMoisture
    Palette { Value: 0 Color: { Red: 101 Green: 59 Blue: 10 } }
    Palette { Value: 0.3 Color: { Red: 233 Green: 204 Blue: 188 } }
    Palette { Value: 0.55 Color: { Red: 255 Green: 255 Blue: 255 } }
    Palette { Value: 0.8 Color: { Red: 148 Green: 176 Blue: 213 } }
    Palette { Value: 1 Color: { Red: 3 Green: 87 Blue: 142 } }
    
  6. soilTemperature
    Palette { Value: -63 Color: { Red: 150 Green: 137 Blue: 211 } }
    Palette { Value: -30 Color: { Red: 136 Green: 206 Blue: 202 } }
    Palette { Value: 0 Color: { Red: 95 Green: 143 Blue: 192 } }
    Palette { Value: 16 Color: { Red: 111 Green: 144 Blue: 38 } }
    Palette { Value: 32 Color: { Red: 222 Green: 176 Blue: 3 } }
    Palette { Value: 48 Color: { Red: 236 Green: 97 Blue: 29 } }
    Palette { Value: 64 Color: { Red: 138 Green: 43 Blue: 11 } }
    
  7. surfaceTemperature
    Palette { Value: -63.5 Color: { Red: 150 Green: 137 Blue: 211 } }
    Palette { Value: -30 Color: { Red: 136 Green: 206 Blue: 202 } }
    Palette { Value: 0 Color: { Red: 95 Green: 143 Blue: 192 } }
    Palette { Value: 16 Color: { Red: 111 Green: 144 Blue: 38 } }
    Palette { Value: 32 Color: { Red: 222 Green: 176 Blue: 3 } }
    Palette { Value: 48 Color: { Red: 236 Green: 97 Blue: 29 } }
    Palette { Value: 63.5 Color: { Red: 138 Green: 43 Blue: 11 } }
    
  8. temperature
    Palette { Value: -40 Color: { Red: 23 Green: 0 Blue: 66 } }
    Palette { Value: -30 Color: { Red: 67 Green: 0 Blue: 137 } }
    Palette { Value: -23 Color: { Red: 30 Green: 0 Blue: 184 } }
    Palette { Value: -18 Color: { Red: 25 Green: 25 Blue: 255 } }
    Palette { Value: -13 Color: { Red: 0 Green: 102 Blue: 255 } }
    Palette { Value: -7 Color: { Red: 17 Green: 188 Blue: 250 } }
    Palette { Value: -3 Color: { Red: 78 Green: 226 Blue: 237 } }
    Palette { Value: 3 Color: { Red: 0 Green: 196 Blue: 93 } }
    Palette { Value: 9 Color: { Red: 82 Green: 145 Blue: 0 } }
    Palette { Value: 14 Color: { Red: 154 Green: 191 Blue: 0 } }
    Palette { Value: 20 Color: { Red: 237 Green: 230 Blue: 21 } }
    Palette { Value: 25 Color: { Red: 244 Green: 173 Blue: 51 } }
    Palette { Value: 31 Color: { Red: 234 Green: 85 Blue: 40 } }
    Palette { Value: 36 Color: { Red: 193 Green: 39 Blue: 54 } }
    Palette { Value: 40 Color: { Red: 130 Green: 17 Blue: 43 } }
    
  9. waterTemperature
    Palette { Value: -2 Color: { Red: 95 Green: 148 Blue: 196 } }
    Palette { Value: 10 Color: { Red: 109 Green: 144 Blue: 40 } }
    Palette { Value: 20 Color: { Red: 222 Green: 176 Blue: 3 } }
    Palette { Value: 30 Color: { Red: 236 Green: 95 Blue: 21 } }
    Palette { Value: 40 Color: { Red: 138 Green: 43 Blue: 11 } }
    
  10. windSpeed
    Palette { Value: 0 Color: { Red: 115 Green: 53 Blue: 217 } }
    Palette { Value: 3 Color: { Red: 45 Green: 125 Blue: 244 } }
    Palette { Value: 7 Color: { Red: 28 Green: 208 Blue: 96 } }
    Palette { Value: 11 Color: { Red: 238 Green: 186 Blue: 29 } }
    Palette { Value: 17 Color: { Red: 230 Green: 79 Blue: 43 } }
    Palette { Value: 21 Color: { Red: 188 Green: 45 Blue: 72 } }
    Palette { Value: 30 Color: { Red: 56 Green: 0 Blue: 63 } }