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 with the data. What I really want is to extract another raster file that I can load with ArcGIS again.After reading a bit more I think the crop function is what I really need. But when I try to use this function
crop(raster, poly_shape)I get this Error:
Error in .local(x, y, ...) : extents do not overlapIn addition: Warning message:In intersect(extent(x), extent
) : Objects do not overlapThe files raster and poly_shape are the same for both functions. Can you tell me what could be wrong here? Is it even right that the crop function creates another raster and not a list?
Thanks for help!
أكثر...
extract(raster, poly_shape)function on the raster it always creates a list with the data. What I really want is to extract another raster file that I can load with ArcGIS again.After reading a bit more I think the crop function is what I really need. But when I try to use this function
crop(raster, poly_shape)I get this Error:
Error in .local(x, y, ...) : extents do not overlapIn addition: Warning message:In intersect(extent(x), extent
Thanks for help!
أكثر...