[mapserver-commits] [MapServer/MapServer] 31f95b: WCS output: fix handling of multiple bands when se...

Even Rouault noreply at github.com
Tue Feb 1 04:26:29 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/MapServer/MapServer
  Commit: 31f95babc611d3cb73fe50c28b4d06080ed2aba7
      https://github.com/MapServer/MapServer/commit/31f95babc611d3cb73fe50c28b4d06080ed2aba7
  Author: Even Rouault <even.rouault at spatialys.com>
  Date:   2022-01-27 (Thu, 27 Jan 2022)

  Changed paths:
    M mapwcs.cpp

  Log Message:
  -----------
  WCS output: fix handling of multiple bands when setting band-specific creation options or metada items


  Commit: 221779944a75293d4ff7a396a20ebbf080948c19
      https://github.com/MapServer/MapServer/commit/221779944a75293d4ff7a396a20ebbf080948c19
  Author: Even Rouault <even.rouault at spatialys.com>
  Date:   2022-01-27 (Thu, 27 Jan 2022)

  Changed paths:
    M mapwcs.cpp
    A msautotest/wxs/expected/wcs_netcdf_3d_output.nc
    A msautotest/wxs/wcs_netcdf_3d_output.map

  Log Message:
  -----------
  WCS netCDF output: allow generation of a 3D dataset from multiple bands

If the input dataset has multiple bands, it is now possible to generate
a 3D dataset with the extra dimension being typically time or Z.

This requires the following metadata item to be defined in
LAYER.METADATA:

"wcs_outputformat_{outputformat}_mdi_BAND_{bandnumber}_default_NETCDF_DIM_{dimname}" "{value}"

where:
- {outputformat} is substituted with the OUTPUTFORMAT.NAME value (typically "netCDF")
- {bandnumber} is substituted with the band number (between 1 and number of bands)
- {dimnname} is substituted with the name of the extra dimension. e.g time.
- {value} is substituted with the value taken on that extra dimension by the band. It must
  be a 32 bit integer, 64 bit integer or floating-point value.

'mdi' stands for metadata item
'default' indicates that this is for the GDAL default metadata item
NETCDF_DIM_ is a specific prefix used by the GDAL netCDF driver to
distinguish metadata items that define extra dimensions.

In addition to that, netCDF attributes can be defined on the extra
dimension by setting metadata items of the form

"wcs_outputformat_{outputformat}_mdi_default_{dimname}#{attrname}" "{value}"

where {attrname} is substituted with the name of the attribute to set on
the extra dimension (e.g. "standard_name", "units", etc.)

Extract from an example mapfile:

```
   # Metadata items to apply to the "time" extra dimension.
   "wcs_outputformat_netCDF_mdi_default_time#calendar" "standard"
   "wcs_outputformat_netCDF_mdi_default_time#standard_name" "time"
   "wcs_outputformat_netCDF_mdi_default_time#units" "hours since 1900-01-01 00:00:00"

   # Values of each band along the "time" extra dimension.
   "wcs_outputformat_netCDF_mdi_BAND_1_default_NETCDF_DIM_time" "10"
   "wcs_outputformat_netCDF_mdi_BAND_2_default_NETCDF_DIM_time" "20"
   "wcs_outputformat_netCDF_mdi_BAND_3_default_NETCDF_DIM_time" "30"
   "wcs_outputformat_netCDF_mdi_BAND_4_default_NETCDF_DIM_time" "40"
   "wcs_outputformat_netCDF_mdi_BAND_5_default_NETCDF_DIM_time" "50"
   "wcs_outputformat_netCDF_mdi_BAND_6_default_NETCDF_DIM_time" "60"
   "wcs_outputformat_netCDF_mdi_BAND_7_default_NETCDF_DIM_time" "70"
   "wcs_outputformat_netCDF_mdi_BAND_8_default_NETCDF_DIM_time" "80"
   "wcs_outputformat_netCDF_mdi_BAND_9_default_NETCDF_DIM_time" "90"
```


  Commit: 833a1e00ff6abc8c3ee2f7942e60e69380d3918f
      https://github.com/MapServer/MapServer/commit/833a1e00ff6abc8c3ee2f7942e60e69380d3918f
  Author: Even Rouault <even.rouault at spatialys.com>
  Date:   2022-01-27 (Thu, 27 Jan 2022)

  Changed paths:
    M mapwcs.cpp
    A msautotest/wxs/expected/wcs_netcdf_3d_input_output.nc
    M msautotest/wxs/expected/wcs_netcdf_input_output_wcs10_get_coverage.nc
    M msautotest/wxs/expected/wcs_netcdf_input_output_wcs20_get_coverage.nc
    A msautotest/wxs/wcs_netcdf_3d_input_output.map

  Log Message:
  -----------
  WCS and netCDF input/output: automatically create a 3D netCDF file for GDAL/netCDF output metadata if the input dataset is itself a 3D netCDF file (if wcs_outputformat_netCDF_mdi_ not defined)


  Commit: 24a39ffdef057c16572155d6f85eef6fdb7a0335
      https://github.com/MapServer/MapServer/commit/24a39ffdef057c16572155d6f85eef6fdb7a0335
  Author: Even Rouault <even.rouault at spatialys.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M mapwcs.cpp
    A msautotest/wxs/expected/wcs_netcdf_3d_input_output.nc
    A msautotest/wxs/expected/wcs_netcdf_3d_output.nc
    M msautotest/wxs/expected/wcs_netcdf_input_output_wcs10_get_coverage.nc
    M msautotest/wxs/expected/wcs_netcdf_input_output_wcs20_get_coverage.nc
    A msautotest/wxs/wcs_netcdf_3d_input_output.map
    A msautotest/wxs/wcs_netcdf_3d_output.map

  Log Message:
  -----------
  Merge pull request #6464 from rouault/netcdf_3d

WCS: add support for generating 3D netCDF files


Compare: https://github.com/MapServer/MapServer/compare/6b60fb830d40...24a39ffdef05


More information about the MapServer-commits mailing list