TransWikia.com

How to tell GDAL which dimension of a 3d raster cube (sd of HDF-EOS5 file) is the bands

Geographic Information Systems Asked on June 28, 2021

I’m working with hyperspectral data, provided in HDF-EOS5 format. The subdataset I need to work on is a cube of 1000×1000 pixels and 66 bands. The order of the dimensions (BIL format) is such that gdal interprets the pixels as bands and the bands as pixels (it finds 1000 bands with 66×1000 pixels). How can I tell GDAL which dimension is the spectral one?
I tried to use gdalmdimtranslate but unsuccessfully. Following the example made here, I passed the subdataset name as array field, with the following syntax: gdalmdimtranslate -of NETCDF -array 'name=subdataset_name, transpose=[1,0,2]' file_name.he5 test_transpose.nc and i get these errors:

ERROR 1: Only single dimensional attribute handled
ERROR 1: Only single dimensional attribute handled
ERROR 1: Only single dimensional attribute handled
ERROR 1: Unexpected array specification part: transpose=[1,0,2]

Is there anything wrong with my syntax? How can I solve the problem? Is there any other way to tell gdal that the spectral dimension is not the one it identifies?

Thanks in advance.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP