Quantcast
Channel: Question and Answer » gdal
Viewing all articles
Browse latest Browse all 397

How to convert SPOT NDVI hdf file to tiff file using gdal_translate command

$
0
0

I have SPOT NDVI images. I want to convert NDVI hdf to tiff. I have used the following code to get the information of hdf file:

gdalinfo 20060501_NDVI.HDF

I get the following output

Driver: HDF4Image/HDF4 Dataset
Files: 20060501_NDVI.HDF
Size is 8849, 5601
Coordinate System is `'
Metadata:
 valid_range=0, 255
Corner Coordinates:
  Upper Left  (    0.0,    0.0)
  Lower Left  (    0.0, 5601.0)
  Upper Right ( 8849.0,    0.0)
  Lower Right ( 8849.0, 5601.0)
  Center      ( 4424.5, 2800.5)
  Band 1 Block=8849x113 Type=Byte, ColorInterp=Gray

As I do not get any information about the SUBDATA SETS in the gdalinfo command I use the following code to convert HDF to TIFF

gdal_translate -of GTiff 'HDF4Image:"20060501_NDVI.HDF":*NDVI'

But I get the output as

FAILURE: No target dataset specified.

As no DATASET is specified, I unable to specify any target dataset. Please let me know how to resolve this. Also I would like to resample the image to 250m resolution by using nearest neighbour (default) method.


Viewing all articles
Browse latest Browse all 397

Trending Articles