Manuel,

You can use overlay methods in sp or, in raster, one of:
linesToRaster, polygonsToRaster, or pointsToRaster.

This:

cob = raster(cobertura)

returns an 'empty' raster with the same extent as cobertura.

Robert


On Fri, Oct 29, 2010 at 4:18 PM, Manuel Spínola <mspinol...@gmail.com> wrote:
> Dear list members,
>
> How I make a raster file from a shapefile?
>
> I tried this, but I don't think is right.  Also, I lost the projection in
> the raster "cob", why?
>
>> cob = raster(cobertura) # cobertura is a shapefile
>> plot(cob)
> Error en .plotraster(x, col = col, maxpixels = maxpixels, ...) :
>  no values associated with this RasterLayer
>
> Best,
>
> Manuel
>
>        [[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
>

_______________________________________________
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