OpenDroneMap / FIELDimageR

FIELDimageR: A R package to analyze orthomosaic images from agricultural field trials. This package is a compilation of functions to analyze pos-mosaicking images from research fields, and allows to: crop the image; remove soil effect; build vegetation indices; rotate the image; build the plot shapefile; extract information for each plot; and evaluate stand count, canopy percentage, and plant height.
GNU General Public License v2.0
230 stars 89 forks source link

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

Open tejasri19 opened 1 year ago

tejasri19 commented 1 year ago

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

filipematias23 commented 1 year ago

Hey there,

Do you know if both images have the same projection?

Best, Filipe

tejasri19 commented 1 year ago

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.