Thank you Roman and Johannes,

What I am doing wrong?

x <- readGDAL("bio1_23.bil")
xr = raster(x)

map <- readOGR(dsn="C:/ProyectoRespacial/EvalHab_reporte", 
layer="Cr_wgs84_meso") # shapefile

 > r2 <- polygonsToRaster(map, xr)
Found 1 region(s) and 1 polygon(s)
Error: no se puede ubicar un vector de tamaño  98.9 Mb

Best,

Manuel



On 14/10/2010 09:27 a.m., romunov wrote:
> See ?raster::polygonsToRaster. There is an argument called "mask". It 
> may provide what you want.
>
> Cheers,
> Roman
>
>
>
> On Thu, Oct 14, 2010 at 5:16 PM, Manuel Spínola <mspinol...@gmail.com 
> <mailto:mspinol...@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
>     mspin...@una.ac.cr <mailto:mspin...@una.ac.cr>
>     mspinol...@gmail.com <mailto:mspinol...@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@stat.math.ethz.ch <mailto:R-sig-Geo@stat.math.ethz.ch>
>     https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
>
>
> -- 
> In God we trust, all others bring data.


-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspin...@una.ac.cr
mspinol...@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@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to