All Products
Search
Document Center

PolarDB:ST_ComputeViewShedSurface

Last Updated:Feb 29, 2024

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

    image.png

  • Visible surface

    image.png

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