Thursday 22 March 2018

Convert multiple Shapefiles in Raster in R(and then plot it)



I'm trying to convert several shapefiles in rasters at the same time. I already was able to read the shapefiles by doing this:


library(maptools)

shps <- dir(getwd(), "*.shp")
for (shp in shps) assign(shp, readShapePoly(shp))
for(j in 1:245)
{
New<-readShapePoly(shps[j])
}


But now, I don't know how to convert these to raster and then plotting it. I tried the commands on this page, but I only obtain errors




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...