This topic describes the ST_ComputeViewShedSurface function. This function calculates the visible surface of the viewpoint in the scene.
Syntax
meshgeom ST_ComputeViewShedSurface(scene sc, cstring viewpoint);Return values
The meshgeom object is returned.
Parameters
Parameter | Description |
sc | The scene object. |
viewpoint | The information about the viewpoint. |
Description
This function calculates the visible surface (the visible triangular strip in the scene object) based on the specified scene object and viewpoint information. The JSON format of the viewpoint information is the same as that in the ST_ComputeFrustum function. The following figures show the scene object and visible surface.
Scene object

Visible surface

Examples
SELECT ST_NumPatches(ST_ComputeViewShedSurface(scene, '{"x" : 2938, "y" : 750, "z" : 90, "h" : 1.8, "azimuth" : 90, "pitch" : -35, "horizontalFov" : 90, "verticalFov" : 60, "distance" : 600, "depthMapSize" : 128}')) from t;
--------
10451