You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The raster package supports nearest neighbour projection in projectRaster, by issuing method="ngb". This should be possible in projectRasterForLeaflet too - it's useful for a number of different datasets.
The text was updated successfully, but these errors were encountered:
I totally agree that there needs to be an option for re-projecting factorial rasters using nearest neighbor. The linear interpolation of the bilinear re-projection (the default in raster::projectRaster) produces floating point values which, in addition to being false values for factorial raster layers, also mess up the legend produced with leaflet::colorFactor.
The user still needs to make sure that their raster is of class factor (as having integer values does not necessary mean factorial, hence the explicit call to raster::as.factor after the re-projection), but that can be easily done with raster::as.factor
The
raster
package supports nearest neighbour projection inprojectRaster
, by issuingmethod="ngb"
. This should be possible inprojectRasterForLeaflet
too - it's useful for a number of different datasets.The text was updated successfully, but these errors were encountered: