Opened 5 years ago

Closed 5 years ago

#2130 closed enhancement (fixed)

Petascope - Importing with wcst_import gdal general recipe should allow selecting bands

Reported by: Dimitar Misev Owned by: Bang Pham Huu
Priority: major Milestone: 10.0
Component: petascope Version: 9.8
Keywords: Cc:
Complexity: Medium

Description (last modified by Bang Pham Huu)

The variables format parameter allows to specify the bands or variables to be imported from an input file (docs)

  // Specify variable names, band ids (0-based), etc.
  "variables": [ "var1", "var2", ... ],

But petascope currently does not support importing a subset of bands (although it does support for grib or netcdf). For example, below is importing 1 band from a png file with 3 bands:

<gml:rangeSet>
    <gml:rangeParameters>
        {"variables": ["1"]}
    </gml:rangeParameters>
    <gml:File>
        <gml:fileReference><![CDATA[
                file:///home/rasdaman/rasdaman_community/rasdaman/systemtest/testcases_services/test_all_wcst_import/testdata/wcs_gdal_select_1band_from_3bands_to_import/rgb.png
            ]]
{{{

}}}
></gml:fileReference>
        <gml:fileStructure>image/png</gml:fileStructure>
    </gml:File>
</gml:rangeSet>

It also needs to fix in wcst_import for gdal general recipe to validate the band identifiers (they must be integer numbers, based 0) which exist in the input multiband files (e.g: rgb.png)

        "slicer": {
          "type": "gdal",
          "bands": [
            {
              "name": "red",
              "identifier": "6" <--- Invalid band idenitifier
            }, {
              "name": "green",
              "identifier": "2"
            }, {
              "name": "blue",
              "identifier": "3" <--- Invalid band identifier
            }
          ],

Change History (3)

comment:1 by Bang Pham Huu, 5 years ago

Component: wcst_importpetascope
Description: modified (diff)
Summary: Importing with gdal should allow selecting bandsPetascope - Importing with wcst_import gdal general recipe should allow selecting bands

comment:2 by Bang Pham Huu, 5 years ago

Description: modified (diff)

comment:3 by Bang Pham Huu, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.