Skip to content
New issue

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

Volume measurement #1350

Open
shubham9436 opened this issue Jun 18, 2020 · 3 comments
Open

Volume measurement #1350

shubham9436 opened this issue Jun 18, 2020 · 3 comments

Comments

@shubham9436
Copy link

Feature description

A Digital Elevation Model file has height embedded in it. A feature to select the polygon based on GeoCoordinates and measure it's volume would be nice

@jany-tenaj
Copy link
Contributor

You're welcome to add that feature.

@sindizzy
Copy link
Contributor

sindizzy commented Jul 3, 2020

Can you describe how this can be done? Are there other GIS that do this? Do you have an example?

@RyanJMcGowan
Copy link

One easy option is Riemman sums. Take elevation delta samples every n meters, and sum the multiple of z deltas by n^2. It's just the area of a box every n meters. The smaller n the more accurate the volume. This isn't a bad solution because DEMs are an approximation already. If n is equal to the DEM's resolution, and both DEMs are equal resolution, and in close alignment, you can just subtract one from the other.

Volumes between two DEMs are pretty accurately calculated using prismoidal volumes. If you overlay the triangles, you will get intersecting shapes of triangles and polygons. The height difference between the centroid of the two shapes multiplied by the 2D area of the shape is the volume of that slice:

  • Intersect the triangles into a set of polygonal shapes.
  • Subdivide each DEM into those shapes.
  • Get the 3D centroid of the convex polygons (or divide the convex polygon further into the triangles that constitute the polygon and get those centroids) of each DEM.
  • Retrieve the two-dimensional areas (not three dimensional area) of all the triangles. You only need to get this from one DEM since the 2D areas are equal.
  • Retrieve the vertical distance between each centroid.
  • Multiply the vertical distance by the area to get the prismoidal volume.
  • Sum the prismoidal volumes.

The only errors will be in triangles that intersect with each other in the Z axis, especially if the triangles are large in area, as it will effectively average the volume for that entire prism. If this is a problem, you can find the intersection and divide the triangles into two during the subdivision step.

Keep in mind that you would sum the negative values and positive values separately in most applications. This gives you excavation and fill volumes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants