Hi folks, can someone help me how to draw whatershed boundary(water catchment area) using cesium api on 3D or 2D terrain

Folks, I need to draw whatershed boundaries of the terrain. If any one has idea pls help me.

Hi Shashi,

What kind of data are you working with? How large of an area are you trying to visualize?

For example, this example in Sandcastle uses topojson to outline states.

Thanks for the reply,
Actually, we don’t have data (it could be shapefiles, geojson etc.) we want to generate data using cesium API, the area is not defined we can select anywhere on the map to see the watershed area in a rectangular shape to generate the watershed area.
How to generate watershed you can check on Qgis using this link.
QGIS Tutorial 1: Generating watersheds from DEM

Thanks
Shashi

Dear Dzung,
pls, do help if you have any suggestions or you have any contact who is able to solve the given issue.

Hi Shashi,

The easiest way is to generate the data using the QGIS tutorial you included, upload the data to Cesium ion, and use our Cesium API to initialize the watershed boundary with the uploaded asset.

You can also use sampleTerrainMostDetailed, which will allow you to pick points on the terrain and then you can draw line connecting those points. This is the way to go if you have generated data and would like to directly copy and paste them into your code file.

There is currently not a watershed dataset in Cesium or a way to do what the QGIS tutorial is showing in Cesium.

1 Like

Thanks