traitecoevo / fg_spectral_diversity

0 stars 0 forks source link

clipping raster by polygon using raster::mask gives different extents? leads to NA values for pixels outside polygon? #18

Closed adelegem closed 5 months ago

adelegem commented 5 months ago

clipped_cons <- raster::mask(cons_raster, cons_polygon)

extent(cons_polygon) class : Extent xmin : 570695.1 xmax : 570814.9 ymin : 6561325 ymax : 6561443 extent(clipped_cons) class : Extent xmin : 570665.3 xmax : 570845.4 ymin : 6561300 ymax : 6561464

adelegem commented 5 months ago

the original extent remains but all pixels outside the polygon are masked with NA values so this is a non-issue :)