1

I have two rasters with different extent and resolution, same coordinate reference, from two different surveys - one RGB and one NIR - takes on different times.

nir_in
class : RasterBrick
dimensions : 981, 1232, 1208592, 4 (nrow, ncol, ncell, nlayers)
resolution : 1.04782e-06, 9.801315e-07 (x, y)
extent : -45.40288, -45.40158, -21.56267, -21.56171 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0

rgb_in
class : RasterBrick
dimensions : 978, 1228, 1200984, 4 (nrow, ncol, ncell, nlayers)
resolution : 1.05155e-06, 9.835644e-07 (x, y)
extent : -45.40288, -45.40159, -21.56272, -21.56176 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0

I have aligned both rasters using align_rgb = resample(rgb_in, nir_in, "bilinear") and it returned

align_rgb
class : RasterBrick
dimensions : 981, 1232, 1208592, 4 (nrow, ncol, ncell, nlayers)
resolution : 1.04782e-06, 9.801315e-07 (x, y)
extent : -45.40288, -45.40158, -21.56267, -21.56171 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0

which seem right, but when I try to plot view the results in QGIS the rasters remains unaligned. I have noticed that the differences are from 6th decimal place onwards.

Am I doing something wrong?

  • 1
    Is your resample in QGIS or ArcGIS? (you don't have a software tag and both platforms have a similar function). If QGIS perhaps this might help gis.stackexchange.com/questions/239855/… – Michael Stimson Jul 30 '18 at 22:46
  • Thanks Michael. I try to resample in Qgis and R. All return the same result – RPRibeiro Jul 31 '18 at 1:20

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.