Skip to content
Prev 23963 / 29559 Next

converting shapes to raster

On Fri, 5 Feb 2016 at 03:50 Antonio Silva <aolinto.lst at gmail.com> wrote:

            
I can' reproduce the problem? I did this, slightly simpler:

library(raster)

## if you have rgdal available
shp.frtcost <- shapefile("BL10_FRT_COSTEIRA.shp")

## no dropping of projection metadata
r <- raster(shp.frtcost,nrows=10,ncols=15)

r <- rasterize(shp.frtcost,r,fun="first")
plot(shp.frtcost,axes=TRUE,xlim=c(-48,-45),border="grey")
plot(r,add=TRUE)



HTH