search for: coverage_area

Displaying 6 results from an estimated 6 matches for "coverage_area".

2023 Dec 06
2
Volume of polygon
...evation? I would be more than happy if anyone could help me. Sincerely " library(raster) library(terra) library(exactextractr) library(dplyr) library(sf) r <- raster("Base.tif") p <- shapefile("p.shp") r <- crop(r, p) r <- mask(r, p) x <- exact_extract(r, p, coverage_area = TRUE) x1 = as.data.frame(x[1]) head(x1) x1 = na.omit(x1) x1$Height = max(x1[,1]) - x1[,1] x1$Vol = x1[,2] * x1[,3] sum(x1$Vol) " -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat194 at yahoo.com [[alternative HTML version deleted]]
2023 Dec 06
2
Volume of polygon
...; Sincerely > > " > library(raster) > library(terra) > library(exactextractr) > library(dplyr) > library(sf) > r <- raster("Base.tif") > p <- shapefile("p.shp") > r <- crop(r, p) > r <- mask(r, p) > x <- exact_extract(r, p, coverage_area = TRUE) > > x1 = as.data.frame(x[1]) > head(x1) > x1 = na.omit(x1) > > x1$Height = max(x1[,1]) - x1[,1] > > x1$Vol = x1[,2] * x1[,3] > > sum(x1$Vol) > > " > > -- > Best Regards > Javad Bayat > M.Sc. Environment Engineering > Alternative Mai...
2023 Dec 06
1
Volume of polygon
...; Sincerely > > " > library(raster) > library(terra) > library(exactextractr) > library(dplyr) > library(sf) > r <- raster("Base.tif") > p <- shapefile("p.shp") > r <- crop(r, p) > r <- mask(r, p) > x <- exact_extract(r, p, coverage_area = TRUE) > > x1 = as.data.frame(x[1]) > head(x1) > x1 = na.omit(x1) > > x1$Height = max(x1[,1]) - x1[,1] > > x1$Vol = x1[,2] * x1[,3] > > sum(x1$Vol) > > " > > -- > Best Regards > Javad Bayat > M.Sc. Environment Engineering > Alternative Mai...
2024 Apr 09
1
Question regarding reservoir volume and water level
...if") >> # Read the polygon shapefile >> p <- st_read("E:/...Dam.shp") >> >> r <- crop(r, extent(p)) >> r <- mask(r, p) >> >> # Extract the cells in each polygon and calculate the area of each cell >> x <- exact_extract(r, p, coverage_area = TRUE) >> # Extract polygon values as a dataframe >> x1 = as.data.frame(x[1]) >> head(x1) >> x1 = na.omit(x1) >> # Calculate the height above the minimum elevation in the polygon >> x1$Height = max(x1[,1]) - x1[,1] >> # Calculate the volume of each cell &g...
2024 Apr 10
1
Question regarding reservoir volume and water level
...on shapefile > >> p <- st_read("E:/...Dam.shp") > >> > >> r <- crop(r, extent(p)) > >> r <- mask(r, p) > >> > >> # Extract the cells in each polygon and calculate the area of each cell > >> x <- exact_extract(r, p, coverage_area = TRUE) > >> # Extract polygon values as a dataframe > >> x1 = as.data.frame(x[1]) > >> head(x1) > >> x1 = na.omit(x1) > >> # Calculate the height above the minimum elevation in the polygon > >> x1$Height = max(x1[,1]) - x1[,1] > >> # C...
2024 Apr 07
1
Question regarding reservoir volume and water level
John, Your reaction was what my original reaction was until I realized I had to find out what a DEM file was and that contains enough of the kind of depth-dimension data you describe albeit what may be a very irregular cross section to calculate for areas and thence volumes. If I read it correctly, this can be a very real-world problem worthy of a solution, such as in places like California