Volume calculation


I want calculate volume of a polygon drawn upon terrain (reference image is attached).

Is there is any way to achieve this.

I’m using Cesium 1.50

The image you uploaded looks like a flat polygon draped over terrain, so I think there isn’t any volume per se to measure there.

In any case, I don’t believe CesiumJS currently has any built in tools to do that. I was looking at Turfjs (http://turfjs.org/) which has a lot of useful tools but I’m not sure if it has anything for that particular case either.

You might try to compute this yourself by approximating the area and multiplying by the height, perhaps.


Also interested in this feature.

Are there any updates, since more than two years have passed?



You can do it by finding all coordinates within the polygon as a grid, then sampleHeightMostDetailed() of all of them (at some resolution of sensibility). There’s a max to min height of volume inside the perimeter (height at your polygon edges). It’s not going to be quick, but it’s certainly possible. I’m sure a bit of searching will get you some options, like this starting point;