I was trying to mask Landsat-8 and Modis (Aqua image). FYI, I have converted the MODIS image to the same projection as Landsat and same resolution as 30m. Finally once i am done with masking using the shape file the result comes out as shown below in QGIS. I have two questions regarding the same

1) As you can see width and height of both the output is not same. It differs by 1. I have tried using with different shape file also but again the issue remains same. I always get height 1 less than MODIS. Though i also tried setting the value of nodata to be 0. But no luck.

2) As you can see below both the images are not overlapping perfectly in QGIS screenshot. Moreover, their extent is also different. So, how do i overcome this problem?





Overlay of Modis on top of Landsat enter image description here

  • Mask selects all the pixels which at least partially intersect the mask. In your two images the pixels are not aligned. I would warp both images into 30 m pixel size with gdalwarp by using the -tap (target aligned pixels) option. – user30184 Sep 20 at 14:02
  • Ok, I will try that. What could be the reason of height not matching in both the cases? – Naresh Sep 20 at 14:11

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.