OrbPro2 a Cesium distribution

SensorViewshed

new Cesium.SensorViewshed(sensor)

Name Type Description
sensor Sensor The owning sensor instance.
Examples:
// Single point query
const result = sensor.viewshed.isVisible(point);
if (result && result.visible) {
  console.log(`Visible at ${result.distance.toFixed(0)} m`);
}
// Batch query
const results = sensor.viewshed.isVisible([p1, p2, p3]);
results.forEach((r, i) => {
  console.log(`Point ${i}: ${r ? (r.visible ? 'visible' : 'occluded') : 'outside'}`);
});
See:

Members

The event fired when tracked coverage percentage changes beyond the configured threshold.
Default Value: new Event()

readonly hasBake : boolean

Whether this viewshed has a valid manual bake for the current sensor revision.
The event fired when tracked entity visibility changes.
Default Value: new Event()

Methods

static Cesium.SensorViewshed.computeOverlapCoverage(sensorsOrViewsheds, options)Promise.<(SensorViewshed.OverlapCoverage|undefined)>

Name Type Description
sensorsOrViewsheds Array.<Sensor> | Array.<SensorViewshed> | Sensor | SensorViewshed Sensors/viewsheds to compare.
options object Options.
Name Type Default Description
positions Array.<Cartesian3> optional Explicit world-space sample points.
rectangle Rectangle | object optional Rectangle in radians used to generate terrain samples when positions is not provided.
terrainProvider TerrainProvider scene.terrainProvider optional Terrain provider used when sampling a rectangle.
resolution number | object 16 optional Rectangle sampling resolution.
includeSamples boolean true optional Retain overlapping sample locations.
maximumSamples number 256 optional Maximum overlapping sample locations retained in the output.
rejectOnTileFail boolean false optional Forwarded to terrain sampling when using a rectangle.
Returns:
Overlap summary, or undefined when fewer than two viewsheds are supplied or sample generation is unavailable.

static Cesium.SensorViewshed.computeVisibilityMatrix(sensors, targets, time, options)Array.<SensorViewshed.VisibilityMatrixEntry>

Name Type Description
sensors Array.<Sensor> | Array.<SensorViewshed> The sensors or viewshed instances to evaluate.
targets EntityCollection | Array.<Entity> The targets to evaluate.
time JulianDate The time at which to evaluate target positions.
options object optional Options forwarded to SensorViewshed#getVisibilityMatrix.
Returns:
Flattened visibility rows.

static Cesium.SensorViewshed.recommendTrackingSensor(sensors, target, time, options)SensorViewshed.SensorHandoffRecommendation|undefined

Name Type Description
sensors Array.<Sensor> | Array.<SensorViewshed> Sensors or viewshed instances to evaluate.
target Entity | Cartesian3 The target entity or target position.
time JulianDate The time at which to evaluate the target.
options object optional Options.
Name Type Default Description
dimensions Cartesian3 optional Optional target dimensions for multi-sample visibility checks.
samples number 3 optional Number of samples per axis for box targets.
threshold number 0.1 optional Visible-fraction threshold.
width number 0.5 optional Pick ray width in metres.
scoreFunction function optional Custom scorer receiving each candidate recommendation.
Returns:
Ranked recommendation result.

bake(options)object|undefined

Manually bakes the current sensor-light cascade depth textures and CPU readback buffers. The bake remains valid until the owning sensor's viewshed revision changes.
Name Type Description
options object optional Options.
Name Type Default Description
resolution number 512 optional Bake texture size.
Returns:
Bake metadata and analysis pixels, or undefined if the sensor-light viewshed is unavailable.

calculateHorizonDistances(options)Promise.<(SensorViewshed.HorizonAnalysis|undefined)>

Name Type Description
options object optional Options.
Name Type Default Description
terrainProvider TerrainProvider scene.terrainProvider optional Terrain provider used for the sweep.
azimuthStepDegrees number 5.0 optional Angular spacing between sweep azimuths.
sampleStepMeters number 250.0 optional Distance between terrain samples along each azimuth.
maximumDistance number sensor.radius optional Maximum sweep distance in metres. Infinite radii are clamped to 100 km unless overridden.
rejectOnTileFail boolean false optional Forwarded to sampleTerrainMostDetailed().
Returns:
Horizon analysis, or undefined when terrain sampling is unavailable.

checkEntityVisibility(targetPosition, options)object|undefined

Name Type Description
targetPosition Cartesian3 World-space centre of the entity.
options object optional Options.
Name Type Default Description
entity object optional The entity to match in pick results.
dimensions Cartesian3 optional Box dimensions (x, y, z) used to generate sample points across the entity extent. When omitted a single centre-point ray is used.
samples number 3 optional Number of samples per axis (total rays = samples³ for a box). Clamped to 1–5.
threshold number 0.1 optional Fraction (0–1) of sample rays that must hit the entity for it to count as visible. Default 10%.
width number 0.1 optional Width of each pick ray volume in meters.
Returns:
`{ visible, visibleFraction, distance, visibleCount, totalSamples }` or undefined if the scene is not available.
Clears the current manual bake, returning the viewshed to live shadow-map sampling.
Returns:
true if a bake was present.

createDepthComparisonStage(options)PostProcessStage|undefined

Name Type Description
options object optional Options.
Name Type Default Description
name string optional Optional stage name.
textureScale number 1.0 optional Post-process texture scale.
visibleColor Color sensor.visibleColor optional Overlay color for visible pixels.
occludedColor Color sensor.occludedColor optional Overlay color for occluded pixels.
overlayAlpha number 1.0 optional Additional alpha multiplier applied to the chosen overlay color.
Returns:
Detached post-process stage, or undefined when the scene or viewshed shadow map is unavailable.

createHorizonLinePolyline(options)Promise.<(object|undefined)>

Name Type Description
options object optional Options.
Name Type Default Description
analysis SensorViewshed.HorizonAnalysis optional Existing horizon analysis. When omitted, SensorViewshed#calculateHorizonDistances is executed first using the same options object.
heightOffsetMeters number 2.0 optional Height offset applied to the rendered horizon points.
closeLoop boolean true optional Whether to close the polyline back to the first horizon point.
addToScene boolean true optional Add the created polyline collection to scene.primitives.
width number 2.0 optional Polyline width in pixels.
color Color Color.CYAN optional Solid color used when no custom material is supplied.
material Material optional Optional polyline material override.
Returns:
Visualization bundle with analysis, positions, primitive, and polyline; or undefined when no horizon data is available.

createOccluderHighlightPolyline(targetPositionOrDetails, options)PolylineCollection|undefined

Name Type Description
targetPositionOrDetails Cartesian3 | SensorViewshed.OccluderDetails Target position or the result from SensorViewshed#getOccluderDetails.
options object optional Options.
Name Type Default Description
occluderColor Color Color.ORANGE.withAlpha(0.95) optional Color for the visible sensor-to-occluder segment.
blockedColor Color Color.RED.withAlpha(0.7) optional Color for the blocked occluder-to-target segment.
width number 3.0 optional Default polyline width in pixels.
occluderWidth number optional Override width for the occluder segment.
blockedWidth number optional Override width for the blocked segment.
showBlockedSegment boolean true optional Whether to draw the occluder-to-target segment.
Returns:
Highlight polyline collection, or undefined when no occluder could be identified.
Name Type Description
options object optional Options.
Name Type Default Description
format string "distance" optional Output format: "distance" returns metres, "normalized" returns decoded [0,1] depth.
Returns:
Decoded cascade buffers, or undefined if no shadow map is active.

exportOccludedAreasGeoJSON(options)object|undefined

Name Type Description
options object optional Options.
Name Type Default Description
maximumFeatures number 1024 optional Maximum occluded pixel features to export.
sensorId string | number optional Override sensor ID in feature properties.
Returns:
GeoJSON FeatureCollection, or undefined if no shadow map is active.

generateCoverageReport(options)SensorViewshed.CoverageReport|undefined

Name Type Description
options object optional Options.
Name Type Default Description
title string "Sensor Coverage Report" optional Report title.
time JulianDate JulianDate.now() optional Report generation time.
includeCoverageArea boolean true optional Include getCoverageArea() output.
includeDeadZones boolean true optional Include getDeadZones() output.
includeBlindSpots boolean true optional Include getBlindSpotStatistics() output.
includeCoverageHistory boolean true optional Include stored coverage history snapshots.
Returns:
HTML report and source data, or undefined if coverage statistics are unavailable.
Name Type Description
options object optional Options.
Name Type Default Description
minimumOcclusionFrequency number 0.8 optional Minimum occlusion frequency required to classify a pixel as persistent.
includeOcclusionFrequencies boolean false optional Include a per-pixel occlusion-frequency buffer for each cascade.
Returns:
Blind-spot summary.
Name Type Description
options object optional Options.
Name Type Default Description
resolution number 512 optional Offscreen framebuffer size.
sampleStride number 1 optional Sample every Nth offscreen pixel.
zoomAware boolean false optional Derive sampleStride automatically from the current camera distance to the sensor.
lod string | number optional Coverage LOD mode. Use "auto" for camera-distance-driven sampling or a numeric level where 0=full resolution, 1=every 2nd pixel, 2=every 4th pixel, etc.
incremental boolean true optional Apply pending dirty-region rereads to the cached cascade depth buffers before computing area.
forceRefresh boolean false optional Ignore cached cascade depth buffers and reread every cascade before computing area.
Returns:
Area statistics, or undefined if no shadow map is active.
Example:
const area = sensor.viewshed.getCoverageArea();
if (area) {
  console.log(`Visible: ${area.visibleAreaKm2.toFixed(2)} km²`);
  console.log(`Occluded: ${area.occludedAreaKm2.toFixed(2)} km²`);
}

getCoverageAreaAsync(options)Promise.<(SensorViewshed.CoverageArea|undefined)>

Name Type Description
options object optional Same options as SensorViewshed#getCoverageArea.
Returns:
Promise resolving to area statistics, or undefined if no shadow map is active.
Returns:
Last tracked delta summary.
Returns:
Coverage snapshots.
Name Type Description
options object optional Options.
Name Type Default Description
sampleStride number 1 optional Sample every Nth shadow-map pixel.
zoomAware boolean false optional Derive sampleStride automatically from the current camera distance to the sensor.
lod string | number optional Coverage LOD mode. Use "auto" for camera-distance-driven sampling or a numeric level where 0=full resolution, 1=every 2nd pixel, 2=every 4th pixel, etc.
incremental boolean true optional Apply pending dirty-region rereads instead of forcing a full reread.
forceRefresh boolean false optional Ignore cached cascade pixels and reread every cascade.
Returns:
Coverage statistics, or undefined if no shadow map is active.
Example:
const stats = sensor.viewshed.getCoverageStatistics();
if (stats) {
  console.log(`${stats.visiblePercentage.toFixed(1)}% visible`);
  console.log(`Nearest occluder at ${stats.nearestOcclusionDistance.toFixed(0)} m`);
}

getCoverageStatisticsAsync(options)Promise.<(SensorViewshed.CoverageStatistics|undefined)>

Name Type Description
options object optional Same options as SensorViewshed#getCoverageStatistics.
Returns:
Promise resolving to coverage statistics, or undefined if no shadow map is active.
Name Type Description
options object optional Options.
Name Type Default Description
includeLocations boolean true optional Include sampled world-space dead-zone endpoints.
includeCartographics boolean true optional Include cartographic coordinates for sampled locations when possible.
maximumLocations number 256 optional Maximum sampled dead-zone locations retained across all cascades.
Returns:
Dead-zone summary, or undefined if no shadow map is active.

getOccludedEntities(entities, time, options)Array.<Entity>

Name Type Description
entities EntityCollection | Array.<Entity> The entities to check.
time JulianDate The time at which to evaluate entity positions.
options object optional Options.
Name Type Default Description
includeUndetermined boolean false optional Include entities whose visibility could not be classified (for example outside the shadow-map coverage).
Returns:
Array of entities determined to be occluded.

getOccluderDetails(targetPosition, options)SensorViewshed.OccluderDetails|undefined

Name Type Description
targetPosition Cartesian3 World-space target position.
options object optional Options.
Name Type Default Description
width number 0.5 optional Pick ray width in metres.
objectsToExclude Array.<object> optional Objects excluded from the pick.
Returns:
Occluder details, or undefined when the point is visible or no blocking pick was found.

getOverlapCoverage(otherSensorsOrViewsheds, options)Promise.<(SensorViewshed.OverlapCoverage|undefined)>

Name Type Description
otherSensorsOrViewsheds Array.<Sensor> | Array.<SensorViewshed> | Sensor | SensorViewshed Additional sensors/viewsheds.
options object Options forwarded to SensorViewshed.computeOverlapCoverage().
Returns:
Sampled overlap coverage summary.

getVisibilityMatrix(targets, time, options)Array.<SensorViewshed.VisibilityMatrixEntry>

Name Type Description
targets EntityCollection | Array.<Entity> The targets to evaluate.
time JulianDate The time at which to evaluate target positions.
options object optional Options forwarded to SensorViewshed#checkEntityVisibility.
Name Type Default Description
samples number 3 optional Number of samples per axis for box targets.
threshold number 0.1 optional Visible-fraction threshold.
width number 0.5 optional Pick ray width in metres.
sensorId string | number optional Override sensor ID value in the output rows.
getDimensions function optional Optional callback returning dimensions for each target: (target, position, time, sensor) => Cartesian3.
Returns:
Visibility rows for this sensor.

getVisible3DTileFeatures(tilesets, options)Array.<object>

Name Type Description
tilesets Cesium3DTileset | Array.<Cesium3DTileset> One or more tilesets to scan.
options object optional Options.
Name Type Default Description
samples number 3 optional Number of samples per axis for volume checks.
threshold number 0.1 optional Visible-fraction threshold.
width number 0.5 optional Pick ray width in metres.
getFeaturePosition function optional Optional callback returning a feature position: (feature, tile, tileset, content, sensor) => Cartesian3.
getFeatureDimensions function optional Optional callback returning a feature extent: (feature, tile, tileset, content, position, sensor) => Cartesian3.
Returns:
Visible feature objects.

getVisibleEntities(entities, time)Array.<Entity>

Name Type Description
entities EntityCollection The entity collection to check.
time JulianDate The time at which to evaluate entity positions.
Returns:
Array of entities visible from the sensor.
Example:
const visible = sensor.viewshed.getVisibleEntities(viewer.entities, viewer.clock.currentTime);
console.log(`${visible.length} entities have clear line-of-sight`);

hideDepthComparisonStage()boolean

Returns:
true when a tracked stage was removed or destroyed.

identifyHighPoints(options)Promise.<(SensorViewshed.HighPointAnalysis|undefined)>

Name Type Description
options object Options.
Name Type Default Description
rectangle Rectangle | object Rectangle in radians to sample.
terrainProvider TerrainProvider scene.terrainProvider optional Terrain provider used for sampling.
resolution number | object 16 optional Grid resolution as a square size or {width, height}.
minimumProminence number 25.0 optional Minimum height above the highest neighboring cell required to report a point.
maximumPoints number 10 optional Maximum number of candidates to retain after sorting by prominence and height.
rejectOnTileFail boolean false optional Forwarded to sampleTerrainMostDetailed().
Returns:
Prominent terrain high points, or undefined when terrain sampling is unavailable.

invalidateCoverageCache(options)

Clears cached coverage readbacks and derived results. When a region or regions are supplied, only those cascade subregions are marked dirty for the next incremental reread.
Name Type Description
options object optional Options.
Name Type Description
regions object | Array.<object> optional Dirty regions in cascade pixel coordinates.
Name Type Description
pointOrArray Cartesian3 | Array.<Cartesian3> A world-space point, or an array of world-space points.
Returns:
For a single point: a result object or undefined if the point is out of range or no shadow map exists. For an array: an array of results (entries may be undefined for out-of-range points).
Examples:
const result = sensor.viewshed.isVisible(Cesium.Cartesian3.fromDegrees(-121.79, 46.854, 4500));
// → { visible: true, distance: 1500, occlusionDistance: 0 }
const results = sensor.viewshed.isVisible([pointA, pointB]);
// → [{ visible: true, ... }, { visible: false, ... }]

markCoverageDirtyRegions(regions)

Marks one or more cascade subregions dirty so the next coverage query can reread just those pixels.
Name Type Description
regions object | Array.<object> Dirty regions in cascade pixel coordinates.

showDepthComparisonStage(options)PostProcessStage|undefined

Name Type Description
options object optional Options forwarded to SensorViewshed#createDepthComparisonStage.
Returns:
The added stage, or undefined.

startCoverageTracking(options)

Name Type Description
options object optional Options.
Name Type Default Description
intervalSeconds number 1.0 optional Minimum time between samples.
minimumVisiblePercentageDelta number 1.0 optional Minimum visible-percentage delta required to raise the event.
historySize number 60 optional Maximum number of history snapshots to retain.
enableDeltaTracking boolean true optional Track per-frame occlusion-mask deltas.
enableBlindSpotTracking boolean true optional Accumulate occlusion frequency for persistent blind-spot reporting.
maximumDeltaLocations number 256 optional Maximum number of changed pixel locations retained per delta sample.

startVisibilityTracking(entities, options)

Name Type Description
entities EntityCollection | Array.<Entity> The entities to track.
options object optional Options.
Name Type Default Description
intervalSeconds number 0.25 optional Minimum time between samples.

Type Definitions

Cesium.SensorViewshed.AggregateCoverageStatistics

Properties:
Name Type Description
visiblePercentage number Percentage of the viewshed footprint with clear line-of-sight (0–100).
occludedPercentage number Percentage blocked by terrain or objects (0–100).
totalPixels number Total shadow map pixels sampled across all cascades.
visiblePixels number Pixels with no obstruction within the sensor radius.
occludedPixels number Pixels with an obstruction within the sensor radius.
averageOcclusionDistance number Average distance to occluders in metres (occluded pixels only).
nearestOcclusionDistance number Distance to the nearest occluder in metres.
farthestOcclusionDistance number Distance to the farthest occluder in metres.
sampleStride number Highest sampling stride used across the aggregated cascades.
sampledPixels number Number of pixels actually sampled across cascades.
estimated boolean Whether any aggregate pixel counts were estimated from sampled subsets.

Cesium.SensorViewshed.BlindSpotStatistics

Properties:
Name Type Description
totalSamples number Number of tracked mask samples accumulated.
minimumOcclusionFrequency number Persistence threshold used for classification.
textureSize number Width/height of each tracked cascade texture.
totalPixels number Total tracked pixels across cascades.
persistentPixels number Pixels occluded at or above the persistence threshold.
transientPixels number Pixels occluded at least once but below the persistence threshold.
neverOccludedPixels number Pixels never observed as occluded.
persistentPercentage number Percentage of persistent blind-spot pixels.
transientPercentage number Percentage of transiently occluded pixels.
maximumOcclusionFrequency number Highest per-pixel occlusion frequency observed.
cascades Array.<SensorViewshed.CascadeBlindSpotStatistics> Per-cascade blind-spot summaries.

Cesium.SensorViewshed.CascadeBlindSpotStatistics

Properties:
Name Type Attributes Description
cascadeIndex number Cascade index.
totalPixels number Total tracked pixels in the cascade.
persistentPixels number Pixels occluded at or above the persistence threshold.
transientPixels number Pixels occluded at least once but below the persistence threshold.
neverOccludedPixels number Pixels never observed as occluded.
persistentPercentage number Percentage of persistent blind-spot pixels.
transientPercentage number Percentage of transiently occluded pixels.
maximumOcclusionFrequency number Highest per-pixel occlusion frequency in the cascade.
occlusionFrequencies Float32Array <optional>
Optional per-pixel occlusion-frequency buffer.

Cesium.SensorViewshed.CascadeCoverageDelta

Properties:
Name Type Description
cascadeIndex number Cascade index.
totalPixels number Total compared pixels in the cascade.
changedPixels number Pixels whose occlusion state changed.
becameOccludedPixels number Pixels that changed from visible to occluded.
becameVisiblePixels number Pixels that changed from occluded to visible.
unchangedPixels number Pixels whose occlusion state did not change.
changePercentage number Percentage of changed pixels in the cascade.

Cesium.SensorViewshed.CascadeCoverageStatistics

Properties:
Name Type Description
cascadeIndex number Cascade index.
visiblePercentage number Percentage of the cascade footprint with clear line-of-sight (0–100).
occludedPercentage number Percentage blocked by terrain or objects (0–100).
totalPixels number Total shadow map pixels sampled in the cascade.
visiblePixels number Pixels with no obstruction within the sensor radius.
occludedPixels number Pixels with an obstruction within the sensor radius.
averageOcclusionDistance number Average distance to occluders in metres (occluded pixels only).
nearestOcclusionDistance number Distance to the nearest occluder in metres.
farthestOcclusionDistance number Distance to the farthest occluder in metres.
sampleStride number Sampling stride used for the cascade analysis.
sampledPixels number Number of cascade pixels actually sampled.
estimated boolean Whether the cascade pixel counts were estimated from a sampled subset.

Cesium.SensorViewshed.CascadeDeadZoneStatistics

Properties:
Name Type Description
cascadeIndex number Cascade index.
totalPixels number Total pixels sampled in the cascade.
deadZonePixels number Pixels that reached maximum depth without a hit.
deadZonePercentage number Percentage of dead-zone pixels in the cascade.
locations Array.<SensorViewshed.DeadZoneLocation> Sampled dead-zone locations retained for the cascade.

Cesium.SensorViewshed.CoverageArea

Properties:
Name Type Description
visibleAreaKm2 number Visible terrain area in km².
occludedAreaKm2 number Occluded terrain area in km².
totalAreaKm2 number Total footprint area in km².
visiblePercentage number Visible area as a percentage (0–100).
occludedPercentage number Occluded area as a percentage (0–100).
totalSamples number Total shadow map pixels analysed.
sampleStride number Sampling stride used for the offscreen area pass.
estimated boolean Whether the area result was estimated from a sampled subset.

Cesium.SensorViewshed.CoverageDelta

Properties:
Name Type Attributes Description
time JulianDate <optional>
Simulation time of the current sample.
previousTime JulianDate <optional>
Simulation time of the previous sample.
textureSize number Width/height of the compared cascade textures.
totalPixels number Total compared pixels across cascades.
changedPixels number Pixels whose occlusion state changed.
unchangedPixels number Pixels whose occlusion state did not change.
becameOccludedPixels number Pixels that changed from visible to occluded.
becameVisiblePixels number Pixels that changed from occluded to visible.
changePercentage number Percentage of changed pixels across cascades.
changedLocations Array.<SensorViewshed.CoverageDeltaLocation> Sampled changed pixel locations.
cascades Array.<SensorViewshed.CascadeCoverageDelta> Per-cascade delta summaries.

Cesium.SensorViewshed.CoverageDeltaLocation

Properties:
Name Type Description
cascadeIndex number Cascade index containing the changed pixel.
pixelIndex number Flattened pixel index within the cascade.
x number Pixel x coordinate.
y number Pixel y coordinate.
previousOccluded boolean Previous occlusion state.
currentOccluded boolean Current occlusion state.

Cesium.SensorViewshed.CoverageHistoryEntry

Properties:
Name Type Description
time JulianDate Simulation time of the snapshot.
visiblePercentage number Visible coverage percentage.
occludedPercentage number Occluded coverage percentage.
totalPixels number Total sampled pixels.
visiblePixels number Visible pixels.
occludedPixels number Occluded pixels.
averageOcclusionDistance number Average distance to occluders in metres.
nearestOcclusionDistance number Distance to the nearest occluder in metres.
farthestOcclusionDistance number Distance to the farthest occluder in metres.

Cesium.SensorViewshed.CoverageReport

Properties:
Name Type Description
html string HTML report document.
data SensorViewshed.CoverageReportData Source data used to render the report.

Cesium.SensorViewshed.CoverageReportData

Properties:
Name Type Attributes Description
title string Report title.
generatedAt JulianDate Report generation time.
sensor Sensor Source sensor.
sensorId string | number | undefined Source sensor identifier.
coverage SensorViewshed.CoverageStatistics Coverage statistics used by the report.
coverageArea SensorViewshed.CoverageArea <optional>
Optional coverage-area summary.
deadZones SensorViewshed.DeadZoneStatistics <optional>
Optional dead-zone summary.
blindSpots SensorViewshed.BlindSpotStatistics <optional>
Optional blind-spot summary.
coverageHistory Array.<SensorViewshed.CoverageHistoryEntry> Coverage history snapshots included in the report.

Cesium.SensorViewshed.CoverageStatistics

Properties:
Name Type Description
visiblePercentage number Percentage of the viewshed footprint with clear line-of-sight (0–100).
occludedPercentage number Percentage blocked by terrain or objects (0–100).
totalPixels number Total shadow map pixels sampled across all cascades.
visiblePixels number Pixels with no obstruction within the sensor radius.
occludedPixels number Pixels with an obstruction within the sensor radius.
averageOcclusionDistance number Average distance to occluders in metres (occluded pixels only).
nearestOcclusionDistance number Distance to the nearest occluder in metres.
farthestOcclusionDistance number Distance to the farthest occluder in metres.
sampleStride number Sampling stride used when reading the coverage result.
sampledPixels number Number of pixels actually sampled before any estimation.
estimated boolean Whether any pixel counts were estimated from a sampled subset.
cascades Array.<SensorViewshed.CascadeCoverageStatistics> Per-cascade statistics.
aggregate SensorViewshed.AggregateCoverageStatistics Aggregate statistics across all cascades.

Cesium.SensorViewshed.DeadZoneLocation

Properties:
Name Type Attributes Description
cascadeIndex number Cascade index containing the dead-zone pixel.
pixelIndex number Flattened pixel index within the cascade.
x number Pixel x coordinate.
y number Pixel y coordinate.
distance number Endpoint distance used for the sampled location.
direction Cartesian3 World-space ray direction for the dead-zone sample.
position Cartesian3 World-space endpoint sampled along the dead-zone ray.
cartographic Cartographic <optional>
Cartographic version of the sampled endpoint when available.

Cesium.SensorViewshed.DeadZoneStatistics

Properties:
Name Type Description
radius number Sensor radius used for dead-zone endpoint reconstruction.
textureSize number Width/height of each cascade texture.
totalPixels number Total sampled pixels across cascades.
deadZonePixels number Total dead-zone pixels across cascades.
deadZonePercentage number Percentage of dead-zone pixels across cascades.
locations Array.<SensorViewshed.DeadZoneLocation> Sampled dead-zone locations across cascades.
cascades Array.<SensorViewshed.CascadeDeadZoneStatistics> Per-cascade dead-zone summaries.

Cesium.SensorViewshed.DepthBufferCascade

Properties:
Name Type Description
cascadeIndex number Cascade index.
width number Texture width in pixels.
height number Texture height in pixels.
data Float32Array Decoded depth values.
minimumValue number Minimum decoded value in the buffer.
maximumValue number Maximum decoded value in the buffer.

Cesium.SensorViewshed.DepthBufferExport

Properties:
Name Type Description
format string Export format ("distance" or "normalized").
radius number Sensor radius used when decoding distance values.
textureSize number Width/height of each cascade texture.
cascades Array.<SensorViewshed.DepthBufferCascade> Decoded depth buffers by cascade.

Cesium.SensorViewshed.HighPointAnalysis

Properties:
Name Type Description
rectangle object Rectangle sampled for the analysis.
Properties
Name Type Description
west number West longitude in radians.
south number South latitude in radians.
east number East longitude in radians.
north number North latitude in radians.
resolution object Sampled grid resolution.
Properties
Name Type Description
width number Sampled grid width.
height number Sampled grid height.
totalSamples number Total terrain samples evaluated.
minimumProminence number Minimum prominence threshold in metres.
highPoints Array.<SensorViewshed.HighPointCandidate> Sorted high-point candidates.

Cesium.SensorViewshed.HighPointCandidate

Properties:
Name Type Description
index number Flattened grid index of the sampled point.
xIndex number Grid x index.
yIndex number Grid y index.
height number Sampled terrain height in metres.
prominence number Height difference between this point and its highest neighbor.
cartographic Cartographic Cartographic position of the candidate.
position Cartesian3 World-space position of the candidate.

Cesium.SensorViewshed.HorizonAnalysis

Properties:
Name Type Description
sensor Sensor Source sensor.
sensorPosition Cartesian3 Source sensor position in world coordinates.
sensorCartographic Cartographic Source sensor position in cartographic coordinates.
maximumDistance number Maximum sweep distance in metres.
sampleStepMeters number Distance between terrain samples along each azimuth.
azimuthStepDegrees number Angular spacing between azimuth sweeps.
azimuths Array.<SensorViewshed.HorizonAzimuthSample> Horizon samples by azimuth.

Cesium.SensorViewshed.HorizonAzimuthSample

Properties:
Name Type Attributes Description
azimuthDegrees number Sweep azimuth in degrees clockwise from north.
headingRadians number Sweep heading in radians.
horizonDistance number Distance to the horizon-defining sample in metres.
maximumElevationAngle number <optional>
Maximum terrain elevation angle encountered along the sweep.
horizonHeight number <optional>
Terrain height of the horizon-defining sample.
horizonCartographic Cartographic <optional>
Cartographic position of the horizon-defining sample.

Cesium.SensorViewshed.OccluderDetails

Properties:
Name Type Attributes Description
visible boolean Always false for identified occluders.
targetPosition Cartesian3 The requested target point.
position Cartesian3 World-space hit position of the blocking occluder.
object object Raw object returned by Scene.pickFromRay().
entity object <optional>
Entity or feature identifier resolved from the pick result.
primitive object <optional>
Primitive resolved from the pick result.
distanceToTarget number Distance from the sensor to the target in metres.
pickedDistance number Distance from the sensor to the picked occluder hit in metres.
occlusionDistance number Occlusion distance reported by isVisible().
occlusionFraction number Occlusion distance normalized by distance to the target.
width number Pick-ray width used for the occluder lookup.
centerVisibility SensorViewshed.VisibilityResult | undefined Visibility result for the target point.

Cesium.SensorViewshed.OverlapCoverage

Properties:
Name Type Attributes Description
totalSamples number Total evaluated sample points.
overlapSamples number Samples covered by at least two sensors.
singleCoverageSamples number Samples covered by exactly one sensor.
uncoveredSamples number Samples not covered by any sensor.
overlapPercentage number Percentage of samples covered by at least two sensors.
sensorIds Array.<string> Sensor IDs participating in the analysis.
resolution object <optional>
Terrain sampling resolution when generated from a rectangle.
Properties
Name Type Description
width number Sampled grid width.
height number Sampled grid height.
samples Array.<SensorViewshed.OverlapCoverageSample> Retained overlapping sample locations.

Cesium.SensorViewshed.OverlapCoverageSample

Properties:
Name Type Attributes Description
index number Flattened sample index.
point Cartesian3 World-space sample point.
cartographic Cartographic <optional>
Cartographic sample point when available.
visibleSensorIds Array.<string> Sensor IDs that reported the point as visible.
overlapCount number Number of sensors covering the sample.

Cesium.SensorViewshed.SensorHandoffCandidate

Properties:
Name Type Description
sensor Sensor Candidate sensor.
sensorId string | number | undefined Candidate sensor identifier.
viewshed SensorViewshed Candidate viewshed instance.
target Entity | Cartesian3 Evaluated target.
visible boolean Whether the candidate met the visibility threshold.
visibleFraction number Fraction of samples marked visible.
occlusionDistance number Center-point occlusion distance in metres.
distance number Sensor-to-target distance in metres.
score number Candidate score used for ranking.
visibility object Result from checkEntityVisibility().
centerVisibility SensorViewshed.VisibilityResult | undefined Result from isVisible() for the target center.

Cesium.SensorViewshed.SensorHandoffRecommendation

Properties:
Name Type Description
bestSensor Sensor Highest-ranked sensor.
bestSensorId string | number | undefined Highest-ranked sensor identifier.
bestViewshed SensorViewshed Highest-ranked viewshed instance.
recommendations Array.<SensorViewshed.SensorHandoffCandidate> Ranked candidates in descending score order.

Cesium.SensorViewshed.VisibilityMatrixEntry

Properties:
Name Type Description
sensor Sensor Source sensor instance.
sensorId string | number | undefined Source sensor identifier.
target Entity Target entity instance.
targetId string | number Target identifier.
visible boolean Whether the target met the visibility threshold.
fraction number Visible sample fraction alias.
visibleFraction number Visible sample fraction from checkEntityVisibility().
distance number Sensor-to-target distance in metres.
visibleCount number Number of visible samples.
totalSamples number Total samples tested.

Cesium.SensorViewshed.VisibilityResult

Properties:
Name Type Attributes Description
visible boolean true if the point has clear line-of-sight from the sensor.
distance number Distance from the sensor to the point in metres.
occlusionDistance number If occluded, the distance to the nearest terrain occluder in metres. Otherwise 0.
point Cartesian3 <optional>
The tested point (only present in batch results).
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.