Dear list members,

I want to convert a shapefile to raster and then crop a layer (raster) with
the created raster (from the shapefile), but I got the following error.  Any
help will be appreciated.

bio1 <- raster("bio1_23.grd")

> ai = readOGR(dsn="C:/ProyectosRespacial/ICE/Shapefiles/Depurado",
layer="aibiotica")
OGR data source with driver: ESRI Shapefile
Source: "C:/ProyectosRespacial/ICE/Shapefiles/Depurado", layer: "aibiotica"
with 1 features and 6 fields
Feature type: wkbPolygon with 2 dimensions

> class(ai)
[1] "SpatialPolygonsDataFrame"
attr(,"package")
[1] "sp"

> bio1ai <- crop(bio1, ai)
Error in intersectExtent(x, y) : Invalid extent

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@una.ac.cr
mspinola10@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]]

