I'm trying to extract the values from a raster layer to a shapefile layer, but the process is extremely time consuming, but 2 hours without me getting any result. In general considering the size of the polygons and the raster this process should not take more than two 2 minutes in cases that I had already done.
the message I get is this:
no loop for break/next, jumping to top level
my code is this:
library(sf)
library(raster)
#shapefile geometry
shp <- sf::st_read("/vsicurl/http://wesleysc352.github.io/seg_s3_r3_m10_fix_estat_amost_val.shp")
#raster geotiff
raster3<-raster::raster("http://wesleysc352.github.io/1final.tif")
#extract values
ext1<-raster::extract(raster3, shp)
OBS Edit: links for reproducible example:
raster https://github.com/wesleysc352/wesleysc352.github.io/raw/master/1final.tif