All Questions
62 questions
3
votes
2
answers
4k
views
How to extract percentage of land cover from a raster according to multiple shapefiles?
I have a raster map that represents land cover of a region, and different shapefiles (total 120) in the same region. I want to know the percentage of every land cover for each shapefile.
For example, ...
4
votes
2
answers
22k
views
Reprojection of shapefile in R and final extraction of values
I need to extract values from some raster files (stack) using a shapefile. to bring both of them in the same CRS, I first transformed the shapefile using the EPSG codes. Opening it in an GIS software (...
5
votes
2
answers
7k
views
Convert ESRI Shapefile to Raster using R - biggest polygon area to raster cell value?
I want to create a raster from an ESRI shapefile. Multiple polygons may exist in one raster cell.
If so, I want to assign the attribute variable which occupies the biggest area of the raster cell. If,...
2
votes
0
answers
514
views
Ecoregions shapefiles: subsetting, extracting and summarizing data from raster
I am attempting to subset and project an ecoregions shapefile from : EPA ECOREGIONS
my data set is found here: SHAPEFILES and RASTER
When I run this code, two major problems occur: 1) I cannot get the ...
13
votes
3
answers
44k
views
Extract Raster from Raster using Polygon shapefile in R
I am new to R and using the raster package. I have a problem extracting polygons from an existing raster file. If I use
extract(raster, poly_shape)
function on the raster it always creates a list ...
4
votes
2
answers
3k
views
Converting shapefile to raster: Character attributes
I've got a shapefile that I would like to convert into a raster, but the trick is that the attribute I want a raster version of is character data. I'm familiar with geoprocessing using GDAL (in the ...
5
votes
2
answers
2k
views
Problem overlapping shapefile and raster in R?
I want to plot a shapefile over a raster file in R but I can't make them overlap perfectly: the raster appears to be rotated of few degrees counter-clockwise. Is it a problem with the projection?
...
0
votes
0
answers
156
views
Calculating mean and standard deviation for raster values using whole pixels within a polygon [duplicate]
I have a raster image and a corresponding shapefile. I would like to calculate the statistics of the values within polygons which have a common attribute but only using pixels which are fully ...
4
votes
1
answer
6k
views
R - Plotting shapefile with geographical (raster) data
Over the last few days I have been trying to plot a shapefile over data loaded into a data.frame within R. It should be a view of radar precipitation with an overlay of the country borders from a ...
0
votes
0
answers
182
views
Why does a shapefile shift after transformation?
I have a shapefile created in the raster package (ER_14.3_2000_poly).
> #read in a raster file
> ER_14.3_2000<-raster('E:/Ecoregions Models/Outputs/ER_14.3/ER_14.3_ConsensusMap3.asc')
> ...
5
votes
1
answer
7k
views
Setting extent and geographic projection in R
I have a raster and a shapefile that I am attempting to view and process in R. The shape file "ER_11.1" has the following specs:
> ER_11.1
class : SpatialPolygonsDataFrame
nfeatures : 22
...
19
votes
1
answer
44k
views
Converting a polygon into a raster using R
I'm trying to convert a shapefile into a raster within R. My approach is to read in the raster as follows:
library(rgdal) # Loads SP package by default
demo <- readOGR('F:/data/', 'shapefile') # ...