How to place hdf raster in correct location

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
etis
Posts: 4
Joined: Fri Apr 29, 2022 7:25 am America/New_York

How to place hdf raster in correct location

by etis » Fri Apr 29, 2022 7:38 am America/New_York

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!
Attachments
smap_l2.JPG
smap_l2.JPG (60.43 KiB) Not viewed yet

Tags:

NSIDC - amyygilliland
User Services
User Services
Posts: 7
Joined: Thu Jan 20, 2022 4:18 pm America/New_York

Re: How to place hdf raster in correct location

by NSIDC - amyygilliland » Mon May 02, 2022 1:46 pm America/New_York

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

etis
Posts: 4
Joined: Fri Apr 29, 2022 7:25 am America/New_York

Re: How to place hdf raster in correct location

by etis » Tue May 03, 2022 2:28 am America/New_York

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.
Attachments
map_l2.JPG
map_l2.JPG (142.22 KiB) Not viewed yet

NSIDC - amyygilliland
User Services
User Services
Posts: 7
Joined: Thu Jan 20, 2022 4:18 pm America/New_York

Re: How to place hdf raster in correct location

by NSIDC - amyygilliland » Wed May 04, 2022 6:59 pm America/New_York

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

etis
Posts: 4
Joined: Fri Apr 29, 2022 7:25 am America/New_York

Re: How to place hdf raster in correct location

by etis » Thu May 05, 2022 6:20 am America/New_York

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 !

Post Reply