[R-sig-Geo] Extract Raster Data Values to Shapefile

iucir@@k m@iii@g oii m@ii@u@i-m@@@heim@de iucir@@k m@iii@g oii m@ii@u@i-m@@@heim@de
Wed May 11 18:08:18 CEST 2022


Hello Everyone,

I have a shapefile with district borders and a raster data file (.tif).

How can I extract the value from the raster data onto each district in  
the shapefile?

I have the exact thing I want with two shapefiles with the command:

x <- st_join(x,y,join=st_overlaps,left=TRUE,largest=TRUE)

This gives me the result I want. I tried to convert the .tif file to a  
shapefile, but this didn't work for me with multiple different  
solutions I found online.

I would appreciate any ideas you might have.

Luca



More information about the R-sig-Geo mailing list