I am trying to mosaic all the data from VIIRS of a day into a single gtiff.

I've already done it with MODIS data using GDAL. The problem it seems is that the coordinates of each h5 files doesn't seem to be in the same file as the data. Which gives this as an error when I try a gdalwarp:

ERROR 1: Unable to compute a transformation between pixel/line and georeferenced coordinates for


There is no affine transformation and no GCPs.

Do you have an idea what could be done to get the localisation data and to merge them together ?

1 Answer 1


If GDAL does not recognize the CRS information, you have to look it up manually using gdalinfo on the individual layer, or read the docs supplied by the creator.

Then apply that CRS information for each layer individually using gdal_translate and using GTiff or VRT as output format.

See this mailing list entry for an example (not on your dataset): http://lists.osgeo.org/pipermail/qgis-user/2014-August/028739.html

MODIS is easier, because GDAL has implemented reading the MODIS coordinate information substructure, see http://www.gdal.org/frmt_hdf4.html and http://www.gdal.org/frmt_hdf5.html, Georeference section. Unfortunately, HDF file creators are free to pack their information in any other way.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.