WeatherLayers
DemoIntegrationsDocsStatus
  • Overview
  • WeatherLayers GL
    • Quick Start
    • Layers
      • Particle Layer
      • Raster Layer
      • Contour Layer
      • HighLow Layer
      • Front Layer
      • Grid Layer
      • Data Loading
      • Data Properties
      • Style Properties
    • Controls
      • Legend Control
      • Timeline Control
      • Tooltip Control
      • Attribution Control
      • Logo Control
      • Control
    • Types
    • Functions
    • Data Sources
    • Security
    • Troubleshooting
    • Pricing
    • Changelog
    • Roadmap
  • WeatherLayers Cloud
    • Quick Start
    • Client
    • Types
    • Security
    • Troubleshooting
    • Datasets
    • Pricing
    • Changelog
    • Roadmap
  • Contact
Powered by GitBook
On this page
  • Data sources
  • Supported data types
  • Supported data formats
  • Supported projections
  • Data transformation
  • Example – Temperature from GRIB to PNG
  • Example – Wind from GRIB to PNG
  1. WeatherLayers GL

Data Sources

Last updated 2 months ago

WeatherLayers GL can be used either with custom self-hosted data or with WeatherLayers Cloud.

For integrating any custom data (NetCDF, GRIB), the data needs to be transformed by your backend server to a supported data type, data format and map projection.

Data sources

  • public data sources - NOAA (GFS, GFS Wave), Copernicus (CMEMS, CAMS)

  • other public data sources - ECMWF, ICON, Copernicus (ERA5), ...

  • commercial data sources

  • custom data sources - your own data from scientific research

Supported data types

  • Uint8

    • quantized data into 256 possible values

    • lower precision, higher compression ratio for lower file size

    • recommended for visualization purposes

    • original data bounds need to be provided to unscale the data into the original data, see

  • Float32

    • original data

    • better precision, lower compression ratio and larger file size

    • recommended for scientific purposes, or for use cases where exact values with no quantization errors are needed

Supported data formats

  • PNG, WebP (Uint8)

    • scalar - R channel

      • nodata - 0 in A channel

    • vector - RG channels

      • nodata - 0 in A channel

  • GeoTIFF (Uint8)

    • scalar - band 1

      • nodata - 0 in band 2

    • vector - bands 1 and 2

      • nodata - 0 in band 4

  • GeoTIFF (Float32)

    • scalar - band 1

      • nodata - NaN in band 1

    • vector - bands 1 and 2

      • nodata - NaN in bands 1 and 2

Supported projections

  • equirectangular projection (EPSG:4326)

Data transformation

Data transformation into a supported format can be done on your servers with GDAL.

Example – Temperature from GRIB to PNG

Scale from [213.15, 325.15] to [0, 255], disable GDAL unit normalization from K to C:

gdal_translate -ot Byte -scale 213.15 325.15 0 255 --config GRIB_NORMALIZE_UNITS=NO temperature.grib temperature.png

WeatherLayers GL configuration:

  • imageType: WeatherLayers.ImageType.SCALAR

  • imageUnscale: [213.15, 325.15]

Example – Wind from GRIB to PNG

Calculate vector magnitude:

gdal_calc --calc='sqrt(A * A + B * B)' -A wind_u.grib --A_band=1 -B wind_v.grib --B_band=1 --outfile wind_magnitude.tif

Merge files:

gdalbuildvrt -separate wind.vrt wind_magnitude.tif wind_u.grib wind_v.grib

Scale from [-128, 127] to [0, 255]:

gdal_translate -ot Byte -scale -128 127 0 255 wind.vrt wind.png

WeatherLayers GL configuration:

  • imageType: WeatherLayers.ImageType.VECTOR

  • imageUnscale: [-128, 127]

See for transformations between data types and data formats.

See for transformations between map projections.

See for calculations and for merging files.

gdal_translate
gdalwarp
gdal_calc
gdalbuildvrt
WeatherLayers Cloud
Data Properties imageUnscale