FIELDimageR icon indicating copy to clipboard operation
FIELDimageR copied to clipboard

Overlap error in plant height code when trying to remove soil from the mask

Open tejasri19 opened this issue 3 years ago • 2 comments

CHM.S <- fieldMask(CHM.R, mask = EX1.RemSoil$mask) [1] "1 layers available" Error in .local(x, y, ...) : extents do not overlap

Help needed @filipematias23

tejasri19 avatar Nov 09 '22 11:11 tejasri19

Hey there,

Do you know if both images have the same projection?

Best, Filipe

filipematias23 avatar Nov 12 '22 14:11 filipematias23

Hey there,

Do you know if both images have the same projection?

Best, Filipe

@filipematias23 Here are the projections of both extent files:

` DSM0 class : RasterStack dimensions : 805, 1263, 1016715, 4 (nrow, ncol, ncell, nlayers) resolution : 0.09327783, 0.09327783 (x, y) extent : 296557.3, 296675.1, 4888179, 4888255 (xmin, xmax, ymin, ymax) crs : +proj=utm +zone=16 +datum=WGS84 +units=m +no_defs names : new_DSM0.1, new_DSM0.2, new_DSM0.3, new_DSM0.4 min values : 0, 0, 0, 0 max values : 255, 255, 255, 255

DSM1.C class : RasterStack dimensions : 668, 177, 118236, 4 (nrow, ncol, ncell, nlayers) resolution : 0.09327783, 0.09327783 (x, y) extent : 296607, 296623.5, 4888185, 4888247 (xmin, xmax, ymin, ymax) crs : +proj=utm +zone=16 +datum=WGS84 +units=m +no_defs names : new_DSM1.1, new_DSM1.2, new_DSM1.3, new_DSM1.4 min values : 0, 0, 0, 255 max values : 255, 255, 255, 255 `

We can observe that extent values do not match.

tejasri19 avatar Nov 17 '22 12:11 tejasri19