There is a bug in the sample of interactive viewshed analysis:
https://developers.arcgis.com/javascript/latest/sample-code/analysis-viewshed/
The preview from the camera (in the right lower corner) is wider than the result of the viewshed analysis. The viewshed field of view does not match well the camera view in the corner. The tower shouldn't be visible in the preview window, because it is out of the viewshed.
Hi @GISExpertPL, thanks for posting your question here. It looks like that line near the circled building is an angled height line, and does not encompass that circled building. It also looks like that circled building is not included because it is still white (like the buildings in the background) and not green/red like the buildings inside the viewshed analysis.
The tall white building isn't included in the analysis (it's not green/red), so why is it visible in the preview window in the lower right corner? The preview window should show FPV from the observer's location, but it shows a wider angle than the red/green viewshed - why?
Hi @GISExpertPL
Thanks for your report. In this sample, we show a simple way how to connect the viewshed with a camera but it doesn't guarantee that what's shown in the preview is 100% matching with what is visible with the chosen viewshed settings (e.g. the viewshed's horisontal LOD could be set to 10 degrees or 360 degrees and the preview size/proportions don't adapt to that). Therefore in short, what you see is expected.
But based on this sample, you're very welcome to build your own application where the preview size/proportions update according to the viewshed settings (but note that the camera fov has its own limitations, e.g. it cannot show 360' view).
Hope this helps you further.
thank you for the clarification. Since the preview does not fully match the viewshed result, could you please explain what level of accuracy we can expect from the preview window in the viewshed tool?
Hi @GISExpertPL
The preview window is not part of the viewshed tool. This sample shows how applications could connect the viewshed analysis with such a preview window but it is on the application developers to customize its behavior to their needs.