Page 1 of 1

How to place hdf raster in correct ___location

Posted: Fri Apr 29, 2022 7:38 am America/New_York
by etis
Hi, I would like to get soil moisture for a specific ___location so I downloaded the h5 file. After I import it in QGIS, the layer shows in a different ___location. How should I translate it ? Thankyou!

Re: How to place hdf raster in correct ___location

Posted: Mon May 02, 2022 1:46 pm America/New_York
by NSIDC-EDL - amyygilliland
Hi etis,

What method did you use for importing the data into QGIS? Also, could you include a screenshot to demonstrate the ___location issue?

I suspect that the reason for this issue is because the data are in a 1D array and not a 2D array. It might be worth re-downloading the data reformatted as GeoTIFF.

I will also mention that version 8 of the SPL2SMP is now available if you are interested: https://nsidc.org/data/spl2smp/versions/8

Kind regards,
Amy

Re: How to place hdf raster in correct ___location

Posted: Tue May 03, 2022 2:28 am America/New_York
by etis
Hi amy, thankyou for answering. I have clicked on 'Add raster layer' and select the h5 file. I have selected using the rectangle tool the area I am interested in before downloading, there was no other format option than hdf. After I import it, the map shows in the middle of the ocean, the scale is fine I think but it should be somewhere else. I have tried different CRSs, but it should be the default EPSG 4326 WGS 84 I guess. I am attaching the picture.
I have downloaded also from your link and this looks like a 1D array and has only landcover_class_fraction, not the soil moisture I am looking for.

Re: How to place hdf raster in correct ___location

Posted: Wed May 04, 2022 6:59 pm America/New_York
by NSIDC-EDL - amyygilliland
Hi etis,

It looks like the reason that the .h5 is failing to read in the correct ___location is that the CRS information is not included in the metadata in a way that QGIS can read it/interpret it. From what I have read, reprojecting an .h5 file in QGIS is tricky. I would recommend using Earthdata search to reformat the data as a GeoTIFF instead.

I believe I misread the data set name originally, it looks like you are using SPL2SMAP_S not SPL2SMP. Here is the link to the NSIDC data set page: https://nsidc.org/data/SPL2SMAP_S and the Earthdata page: https://search.earthdata.nasa.gov/search/granules?p=C1931663473-NSIDC_ECS&pg[0][v]=f&pg[0][gsk]=-start_date&tl=1583080558!4!!. For more information on using Earthdata search, I would recommend this page: https://nsidc.org/support/how/search-order-and-customize-nsidc-daac-data-nasa-earthdata-search

I hope this helps, but please let me know if you have any additional questions.

Kind regards,
Amy

Re: How to place hdf raster in correct ___location

Posted: Thu May 05, 2022 6:20 am America/New_York
by etis
Hi Amy,

Thankyou for your help, now I understand why it didn't worked before, I didn't knew how to convert it to GeoTIFF. With your help I managed to get the right data and now it's placing in the correct ___location. Thankyou very much !

Re: How to place hdf raster in correct ___location

Posted: Mon Apr 24, 2023 2:48 pm America/New_York
by kirankotigobba
Hii amy you said "reprojecting an .h5 file in QGIS is tricky", is it impossible to that or what? I searched everywhere but couldn't get the answer..