HDF Data set extraction

hello everybody:
I’ve just started learning,I want to extract the HDF dataset from the modis data, then convert the dataset to tiff image, and I use the javaAPI to implementation, how can I implement this? Are there examples?
i have another question ,why do i fail to read the hdf data? the code is as follows
Product product=ProductIO.readProduct("D:\\DI\\MYD11A2\\2013\\MYD11A2.A2013001.h26v04.006.2016189180746.hdf");//read hdf data if (product==null) { System.out.println("it fails to read"); }
it prints “it fails to read”,when i use beam to read the same hdf data and i don’t use hdf.jar ,however it works, is it because the beam can read this hdf file while the SNAP don’t ?
any idea will be deeply appreciated
thank you for your reply in advance!

1 Like

The data ‘MYD11A2’ is not explicitly supported by SNAP nor by BEAM.
Maybe it is read generically by the NetCDF library.

You can try to open it in the desktop application and open the information window. There it should be stated with which reader the file was read.

If you just want to convert the file into a different format you can simply use the pconvert tool.
It is located in the bin folder of the SNAP installation directory.

Type pconvert -h to get usage information

1 Like