I've been using MRT (Modis Reprojectin tool) to extract EVI bands into a geotiff with geographic coordinates (epsg4326). I did not specify an output resolution to MRT. The output from MRT had a spatial resolution of 0.002543280392921 degrees.

Recently I tried using GDAL to extract EVI bands. First I used gdal_translate to extract the EVI band in SIN. That gets me a image with 231.65m resolution (native MODIS resolution - OK). But when I use gdalwarp to convert the image to epsg:4326, the output resolution is 0.001682583113332 degrees! (again, I did not specify the output resolution in gdalwarp). If I convert to UTM, it gives me a resolution of 179.7m.

Shouldn't gdalwarp give me the same resolution obtained from MRT?


If you don't specify the target resolution in gdalwarp, it makes an educated guess of what could make sense. In most cases, it uses an average of the x and y resolution of the source data. But if you reproject from meters to degrees, this might go wrong. So you better set the target resolution or size with tror -ts (but not both!) explicitely each time.

I don't know what MRT uses as default for resolution, and GDAL does not know it either...

  • What is strange is that if I use gdal_translate to extract the band in Sinusoidal, it comes with the expected resolution (231m). However, when I project to UTM, the resolution is reduced to 179.9m. If using MRT to project to UTM, it keeps the original resolution (231m). Shouldn't gdal try to keep the original resolution.
    – Daniel
    Feb 20 '15 at 12:55
  • gdal_translate does not change the pixel size unless you force it to. For reprojecting, rescaling is necessary because the cell shape may change from source rectangle to trapezoid, which has to be interpolated to fit target rectangles. And the source trapezoids can have different sizes in the target projection within your area: 1*1 degree on a worldwide map can not be converted into fixed a*b metres or vice versa.
    – AndreJ
    Feb 20 '15 at 13:22
  • Thanks for your help AndreJ, I'll use the tr (or ts) option. I'm just intrigued that the reprojection done by MRT maintains the native resolution when using UTM proj. as gdalwarp changes it.
    – Daniel
    Feb 20 '15 at 13:31

Your Answer

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

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