We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When running extract_metrics on a SpatRaster with an ID layer, the function removes it.
extract_metrics
SpatRaster
ID
Source code here
Example:
# get template raster r <- system.file("extdata", "mraster.tif", package = "sgsR") mr <- terra::rast(r) # import existing polygons e <- system.file("extdata", "existing.shp", package = "sgsR") e <- sf::st_read(e) # rename one layer to 'ID' names(mr) <- c('ID', 'pzabove2', 'zsd') # extract metrics extract_metrics(mr, e) # Simple feature collection with 200 features and 3 fields # Geometry type: POINT # Dimension: XY # Bounding box: xmin: 431110 ymin: 5337710 xmax: 438530 ymax: 5343230 # Projected CRS: UTM_Zone_17_Northern_Hemisphere # First 10 features: # pzabove2 zsd FID geometry # 1 23.4 0.74 0 POINT (433650 5340870) # 2 2.6 1.47 1 POINT (434430 5339050) # 3 60.4 1.73 2 POINT (433830 5341130) # 4 22.7 0.95 3 POINT (434070 5341110) # 5 62.2 1.07 4 POINT (432950 5343230) # 6 55.4 2.31 5 POINT (432990 5342450) # 7 65.7 2.60 6 POINT (432050 5342890) # 8 52.5 2.84 7 POINT (438250 5339310) # 9 63.7 2.85 8 POINT (434970 5342590) # 10 15.0 0.41 9 POINT (437770 5339150)
The text was updated successfully, but these errors were encountered:
fixed in dev branch
Sorry, something went wrong.
#27
2ca80b7
tgoodbody
No branches or pull requests
When running
extract_metrics
on aSpatRaster
with anID
layer, the function removes it.Source code here
Example:
The text was updated successfully, but these errors were encountered: