Viewshed
The Viewshed tool renders dynamic tilesets based on line-of-sight visibilities from user defined source points. Users can change viewshed colors, opacities, source heights, fields of views and visualize multiple viewsheds simultaneously.
Tool Configuration
Example
{
"data": [
{
"name": "Unique Name 1",
"demtileurl": "Layers/Example/demtileset/{z}/{x}/{y}.png",
"minZoom": 8,
"maxNativeZoom": 18
},
{ "...": "..." }
],
"curvature": false,
"cameraPresets": [
{
"name": "CAM A",
"height": 2,
"azCenter": 0,
"azFOV": 70,
"elCenter": -10,
"elFOV": 30
},
{ "...": "..." }
]
}
data - At minimum, the Viewshed tool requires at least one “data” source. A data source describes a DEM tileset (see /auxiliary/1bto4b) and allows users to select it by name to generate viewsheds over.
curvature - Optionally setting this to false disables the account of drop-off based on planetary curvature when calculating viewsheds. If unset or set to true, the configured Major Radius will be used during generations.
cameraPresets - Are optional but, if set, require only “name” to be defined. Setting these allows users to quickly navigate to preset camera parameters. “height”, “azCenter”, “azFOV”, “elCenter” and “elFOV” are all optional and are all of type number.
Tool Use
Options
Users can modify the following parameters per viewshed:
Data - Changes the dataset to perform the viewshed on.
Color - Changes the color of the viewshed.
Opacity - Changes the opacity of the viewshed.
Resolution - Because viewshedding requires a lot of data which can slow things down, four resolutions of data are provided. Ultra, the highest resolution, matches the resolution of the current raster tiles based on zoom. For example if the raster basemap is at 200 meters/pixel, an ultra viewshed would be generated with 200 meters/pixel (or highest available) digital elevation map (DEM) data. The resolution of the DEM impacts the accuracy of the generated viewshed. High is half the resolution of ultra, Medium, the default, is half the resolution of high, and low is half the resolution of medium. Due to performance issues both ultra and high resolutions require manual regeneration upon changes to viewshed parameters or regions.
Reverse - Normally viewsheds color the visible regions. Reversing the viewshed colors everything except the visible regions.
Camera Preset - Using values configured for the Viewshed Tool, sets other parameters to mock a camera.
Height - The distance, in meters, that the viewshed source point sits above the surface.
FOV (Az) - The azimuthal (horizontal) field of view.
FOV (El) - The elevational (vertical) field of view.
Center Azimuth - The azimuthal look-at angle. 0deg (North) -> 360deg (North) increasing clockwise. The generated viewshed will encompass the range such that half its FOV falls on either half of its angle.
Center Elevation - The elevational look-at angle. -90deg(Down) -> 90deg (Up). The generated viewshed will encompass the range such that half its FOV falls on both top and bottom halves of its angle.
Latitude - The latitude of the viewshed’s source point.
Longitude - The longitude of the viewshed’s source point.
Technical
- The accuracy of the Viewshed tool has been independently verified within ArcGIS.
- Viewsheds are generated entirely in-browser in JavaScript using tiled data.
- The algorithm is derived from “Generating Viewsheds without Using Sightlines. Wang, Jianjun, Robinson, Gary J., and White, Kevin. Photogrammetric Engineering and Remote Sensing. p81” with implementation guidance from gdal_viewshed.
- The algorithm is somewhat special to our DEM tile format in how it deal seam boundaries and stitches tiles together.
- An additional data manager was written to query for all tiles necessary to render the viewshed for the current screen.
- Azimuth and elevation fields-of-views and look-ats are new.