[R-sig-Geo] Clip a raster

Johannes Signer j.m.signer at gmail.com
Thu Oct 14 17:39:28 CEST 2010


Hi,

with the raster package you could use: polygons to raster
(?polygonsToRaster), converting the Costa Rica shapefile to a raster
and then use mask (?mask).

Best
Johannes

On Thu, Oct 14, 2010 at 5:16 PM, Manuel Spínola <mspinola10 at gmail.com> wrote:
>  Dear list members,
>
> I download bioclim data in a raster format (estension: .bil) and I would
> like to clip the variables to a ploygon stored as a shapefile (Costa
> Rica outline).
> How can I do that?
>
> I read the raster file like this:
>
> x <- readGDAL("bio1_23.bil")
>
> Thank you very much in advance.
> Best,
>
> Manuel
>
>
> --
> *Manuel Spínola, Ph.D.*
> Instituto Internacional en Conservación y Manejo de Vida Silvestre
> Universidad Nacional
> Apartado 1350-3000
> Heredia
> COSTA RICA
> mspinola at una.ac.cr
> mspinola10 at gmail.com
> Teléfono: (506) 2277-3598
> Fax: (506) 2237-7036
> Personal website: Lobito de río
> <https://sites.google.com/site/lobitoderio/>
> Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>
>
>        [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>



More information about the R-sig-Geo mailing list