Re: [R] Volume of polygon

2023-12-05 Thread Jeff Newmiller via R-help
A raster is just a matrix of elevations. Each element of that matrix has a horizontal area. If you subtract that elevation from a reference elevation and zero out all negative values then you are left with a bunch of rectangular parallelopipeds of varying height. Add those heights up and multipl

Re: [R] Volume of polygon

2023-12-05 Thread javad bayat
Dear Bert; Thank you for your reply. The reservoir is not cylindrica. This is the table I have created from the data extracted. Maybe there is a way to get the relation between Elevation, Area and Volume to get the elevation at a specific Volume. Sincerely valueArea Height V

Re: [R] Volume of polygon

2023-12-05 Thread Bert Gunter
The volume of a polygon = 0. Polyhedra have volumes. This may be irrelevant, but if the lake is cylindrical == constant cross sectional area at all depths, then height doubles when the volume does and vice versa. Otherwise you have to know how area varies with height or use more sensible appro

[R] Volume of polygon

2023-12-05 Thread javad bayat
Dear all; I am trying to calculate the volume of a polygon shapefile according to a DEM raster. I have provided some codes at the end of this email.I dont know if the codes are correct or not. Following this, I have another question too. I want to know if the volume of the reservoir rises or doubl