# ViewShed3D Analysis

**URL:** <https://community.cesium.com/t/viewshed3d-analysis/20782>\
**Category:** CesiumJS\
**Created:** [October 13, 2022, 1:48pm UTC](https://community.cesium.com/t/viewshed3d-analysis/20782 "2022-10-13T13:48:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valentin\_Peshev](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/valentin_peshev/32/3384_2.png) [@Valentin\_Peshev](https://community.cesium.com/u/Valentin_Peshev)\
**Post date:** [October 13, 2022, 1:48pm UTC](https://community.cesium.com/t/viewshed3d-analysis/20782/1 "2022-10-13T13:48:44Z")

</div>

Hello! I am trying to get ViewSed3D Analysis.

```auto
new Cesium.ViewShed3D(viewer, {
        horizontalAngle: 50,
        verticalAngle: 50,
        distance: 200,
});

```

Using this over a 3d Model (Cesium3DTileset) as result I am seeing the red/green zones as shown in the screenshot.

 ![image](https://global.discourse-cdn.com/cesium/original/3X/8/0/80470ca56269338bea482a7f170ffa906baa8d64.jpeg)

My question: Is there a way to get any information about the red/green zones: example: the area of each red/green zones or how many % one of the zones or any other information related to it.  
The goal is to be able to calculate how many of to provided area is visible from the placed point

My second question is is it possible to export this ViewSed3D output somehow. (in another 3d model, geojson or something else) ?

---

<div class="post-metadata">

**Author:** ![Jacky](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jacky/32/7686_2.png) [@Jacky](https://community.cesium.com/u/Jacky)\
**Post date:** [October 15, 2022, 10:04am UTC](https://community.cesium.com/t/viewshed3d-analysis/20782/2 "2022-10-15T10:04:36Z")

</div>

Hi @Valentin_Peshev , You havn’t shared viewshed source code. It seems like you are using [PostProcessStage - Cesium Documentation](https://cesium.com/learn/cesiumjs/ref-doc/PostProcessStage.html). You can try to get visible area ratio from the **fragmentShader** code. It’s just an idea, I’ve never worked on shaders.

I hope someone else can give you better direction to solve your issue.

- Regards

---

<div class="post-metadata">

**Author:** ![Valentin\_Peshev](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/valentin_peshev/32/3384_2.png) [@Valentin\_Peshev](https://community.cesium.com/u/Valentin_Peshev)\
**Post date:** [October 15, 2022, 12:16pm UTC](https://community.cesium.com/t/viewshed3d-analysis/20782/3 "2022-10-15T12:16:42Z")

</div>

@Jacky Thank you for your answer.  
Now I understand better how that works.I hadn’t noticed that this ViewShed3D method is external in the project (I thought its a Cesium built it feature).  
Yes its using PostProcessStage but the source code is minified and a little bit hard to understand whats happening there.

I will be helpful if somebody else could suggest a solution for my questions:

1. Looking for a way to create 3d ViewShed Analysis as shown in the screenshot (get how many % is hidden and visible from selected point)

---

<div class="post-metadata">

**Author:** ![TJ\_Koury](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/tj_koury/32/3280_2.png) [@TJ\_Koury](https://community.cesium.com/u/TJ_Koury)\
**Post date:** [July 13, 2023, 11:20pm UTC](https://community.cesium.com/t/viewshed3d-analysis/20782/4 "2023-07-13T23:20:02Z")

</div>

I’m working on something similar here:

> **[GitHub - DigitalArsenal/SensorShadow](https://github.com/DigitalArsenal/SensorShadow)**
>
> Contribute to DigitalArsenal/SensorShadow development by creating an account on GitHub.

Might try to add an export functionality at some point

---

<div class="post-metadata">

**Author:** ![youjiti123](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/youjiti123/32/15445_2.png) [@youjiti123](https://community.cesium.com/u/youjiti123)\
**Post date:** [August 14, 2023, 6:32am UTC](https://community.cesium.com/t/viewshed3d-analysis/20782/6 "2023-08-14T06:32:42Z")

</div>

hello.In the latest version of Cesium, the ShadowMap constructor no longer has parameters. How should this be resolved?

---

<div class="post-metadata">

**Author:** ![trung\_tran](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/trung_tran/32/25035_2.png) [@trung\_tran](https://community.cesium.com/u/trung_tran)\
**Post date:** [August 2, 2024, 8:55pm UTC](https://community.cesium.com/t/viewshed3d-analysis/20782/7 "2024-08-02T20:55:17Z")

</div>

![image](https://global.discourse-cdn.com/cesium/original/3X/d/3/d3816e3fd67ce7210d331d5acee5f1998984577c.png)  
Property ‘ViewShed3D’ does not exist on type ‘typeof import(“cesium”)’.

you know how to fix this bug ?
