[R-sig-Geo] Fill NoData cells in a raster

Zack Holden zaholdenfs at gmail.com
Fri Mar 18 15:45:41 CET 2016


Marine,
The focal() function in the raster library should work. You should be able
to apply a custom function to only NA cells by setting NAonly=T.

require(raster)
?focal

Zack


On Thu, Mar 17, 2016 at 5:27 PM, Marine Regis <marine.regis at hotmail.fr>
wrote:

> Hello,
>
> I am beginner in spatial statistics and I would need some advice. I have a
> raster that is based on a grid of 30 m resolution and in which each cell is
> assigned to one of ten land cover types (coded as 1, 2, 3, 4, ..., 10 in
> the raster). However, there are some NoData cells in the raster. Is there
> an efficient way to fill NoData cells with reasonable values of land cover
> types? Should I use an interpolation method?
>
> Thank you very much for your time.
>
> Marine
>
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list