1

I'm currently working with large-domain MODIS data. These come in multiple separate HDF4 files which I stitch together into a virtual data set (VRT), reproject into EPSG:4326, sub-set to the domain of interest and convert to .tif. This seems to work as expected.

When I repeat this procedure with a VRT that consists of only a single MODIS tile, the resulting .tif file for some reason comes out at about half the original resolution. Specifying a resolution for the VRT with e.g. -resolution highest does not change this. What am I missing here?

MWE

GDAL 3.0.4 with HDF4 support

Input file (11 MB): https://github.com/wknoben/gis_se/blob/main/MCD12Q1.A2015001.h10v03.006.2018146022714.hdf

gdalbuildvrt modis.vrt MCD12Q1.A2015001.h10v03.006.2018146022714.hdf -sd 1 -resolution highest
gdalwarp -of VRT -t_srs "EPSG:4326" modis.vrt modis_4326.vrt
gdal_translate -projwin -116.55 51.74 -115.52 50.95 modis_4326.vrt modis_4326_cut.vrt
gdal_translate -co "COMPRESS=DEFLATE" modis_4326_cut.vrt modis_4326_cut.tif

Source HDF and resulting tif

Source HDF4 file in QGIS

Resulting .tif file in QGIS

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.