Terrain Viewshed Lab

Terrain Viewshed Lab

Use a grid-cell center as an observer on a small, north-up single-band DEM GeoTIFF and test line of sight to every target cell. Intermediate terrain is bilinearly sampled; a sample strictly above the ray blocks it, while unknown intermediate NoData stays unknown. This is a local terrain approximation for learning and exploration, not certified surveying or radio engineering.

1. Source DEM GeoTIFF

Local single-band DEM only. Max 8 MiB file, 80 cells per side and 6400 total cells.

2. Observer and line-of-sight heights

Eye and target heights must use the declared DEM elevation unit. Radius is always metres. Cell centers are used.

Intermediate terrain strictly above the ray blocks it; equal height is visible. Spherical distance, a straight source-grid ray and bilinear terrain are approximations. Earth curvature, refraction, buildings and trees are excluded.

GeoTIFF library license originals

Choose a DEM GeoTIFF or load the example.

Comments & questions

Terrain Viewshed Lab

Use a grid-cell center as an observer on a small, north-up single-band DEM GeoTIFF and test line of sight to every target cell. Intermediate terrain is bilinearly sampled; a sample strictly above the ray blocks it, while unknown intermediate NoData stays unknown. This is a local terrain approximation for learning and exploration, not certified surveying or radio engineering.

Key features

  • Read a real single-elevation-band EPSG:4326/3857 GeoTIFF, georeferencing and NoData
  • Set observer row/column, eye/target offsets, declared source elevation unit and radius
  • Check four intermediate samples per cell-center spacing with bilinear terrain heights
  • Show visible, blocked, NoData/unknown and outside-radius classes with distances and sample count
  • Export an 8-bit georeferenced GeoTIFF mask, visual PNG and per-cell coordinate/distance CSV
  • Explicitly reject rotation, other CRS, multiband DEMs and oversized grids; allow cancellation

How to use

  1. Choose a single-band DEM GeoTIFF or load the synthetic hill example.
  2. Set zero-based observer row/column, source elevation unit, eye/target heights and radius in metres.
  3. Run the calculation and inspect green visible, red blocked, gray unknown and pale blue outside-radius cells.
  4. Click a map cell to move the observer and rerun, or download GeoTIFF, PNG and CSV.

Use cases

  • Explore how a hill hides terrain behind it in a small DEM
  • Compare local visibility after changing observer or target height
  • Export a georeferenced status grid for inspection in GIS

Frequently asked questions

How does this differ from Screen Info?

Screen Info reads browser display dimensions and pixel ratio. This tool computes terrain line of sight between positions on a real georeferenced elevation grid.

What if terrain just touches the sightline?

Only an intermediate terrain sample strictly above the ray blocks it. Contact or equal height within numerical tolerance remains visible. If intermediate NoData is present and no known blocker is found, visibility is unknown.

How are distance and accuracy modeled?

Radius and along-ray fractions use spherical great-circle distances, while the ray path is straight in the source raster grid. Terrain heights are bilinearly interpolated. Earth curvature, atmospheric refraction, buildings, trees, DEM vertical datum and measurement error are omitted.

Which elevation units and CRS work?

Declare the source elevation numbers as metres or feet; eye and target heights use that same unit. Radius and distance output use metres. Only north-up PixelIsArea GeoTIFF tagged EPSG:4326 or 3857 is accepted; rotation, PixelIsPoint and other CRS are rejected.

How do I interpret downloads?

The 8-bit GeoTIFF preserves source georeferencing: 1=visible, 0=blocked, 2=NoData/unknown, 3=outside radius. Value 2 is the NoData tag. PNG is only a color preview without georeferencing; CSV gives each cell center coordinate, distance and class.

Can this process a large DEM?

Files are capped at 8 MiB, 80 cells per side, 6400 total cells and 1.5 million valid intermediate samples. Use specialist GIS viewshed software for large or engineering-critical work.

Privacy

The DEM remains in this browser tab. File reading, analysis and downloads run locally without uploading the file or coordinates to a server API.

References

Related Tools

Raster Reprojection LabCoordinate Reference LabGeoJSON Map EditorWasm Module InspectorHreflang Matrix CheckerAST Query PlaygroundContainer Build GraphDependency Graph ExplorerSemver Range LabCron Schedule AuditorPatch Review WorkbenchSource Map ExplorerLocalization Catalog AuditorStructured Data ReviewerHTTP Archive AnalyzerWebhook Signature LabProtobuf Schema WorkbenchGraphQL Schema LabAvro Schema EvolutionLocal SQL WorkbenchSchema Form BuilderMesh Repair WorkbenchPipe Network LabRobot Arm Kinematics LabThermal Network LabBeam Response LabGear Train DesignerTolerance Stackup LabSensor Calibration FitPCB Stackup PlannerDigital Filter DesignerNetwork Reachability MapSun Shadow MapGPS Error SimulatorDigital Logic SimulatorAnalog Circuit LabMechanism Linkage LabAnalysis Mesh GeneratorOpenAPI Contract InspectorDatabase Migration PlannerDimensional Equation CheckerTruss Force LabBoolean Minimization LabControl Response LabQueueing Simulation LabGeofence Event SimulatorSurvey Traverse LabRaster Classification LabChoropleth Design LabMap Print ComposerElevation Contour MakerWatershed DelineatorMap Tile PackagerText File Encoding WorkbenchFilesystem Portability AuditorSBOM License ExplorerFile Signature Auditornpm Lockfile Conflict ResolverSource Secret AuditorOffline Web Package BuilderCertificate Chain InspectorTorrent Metainfo InspectorChunked File PackagerEncrypted File VaultDuplicate File FinderArchive WorkbenchDesign Token ManagerSpacing Token DesignerResponsive Type SystemPackaging Dieline DesignerSVG Icon Sprite PackerFlex Layout PlaygroundCSS Grid PlaygroundRegex Equivalence LabMarkdown Repository AuditorLog Template MinerResponsive Layout AuditorEmail Template PreviewInternal Link GraphState Machine TesterPetri Net SimulatorGit History VisualizerCurl Request WorkbenchBinary Protocol DesignerHex File EditorBinary Patch WorkbenchFile Signature WorkbenchAPI Mock SandboxSchema Column MapperEvent Log SessionizerER Diagram DesignerTime Series Gap AuditorStratified Data SplitterData Lineage DesignerDecision Tree LabData Anonymization WorkbenchData Expectation RunnerJSON Schema ValidatorBasket Pattern AnalyzerRobots Policy TesterSEO HTML AuditorAccessibility Structure AuditorSyndication Feed WorkbenchIndexNow Payload BuilderCrawl Log AnalyzerCSP Policy WorkbenchSearch Performance AnalyzerCSV Formula Risk AuditorCORS Response SimulatorCache Header LabCookie Policy InspectorWeb Vitals Trace LabSitemap Health AuditorBatch File RenamerFile Manifest VerifierFolder Space MapFolder Difference ReviewerRoute Order OptimizerPolygon Overlay LabCartographic Label PlacerSpatial Table JoinGeoJSON Topology AuditorGPX Track AnalyzerTrack Privacy RedactorCSV Table JoinCSV Pivot WorkbenchScientific Data ProfilerTabular Cleaning WorkbenchRecord ReconciliationData Dictionary BuilderCanonical Graph AuditorRedirect Plan TesterHTTP response and ping reference testBrowser and System InformationJSON ↔ YAML ConverterXML ↔ JSON ConverterHTML FormatterJavaScript MinifierMock Data Generator.gitignore GeneratorLicense GeneratorUser-Agent ParserPassword Strength CheckerCode to ImageXML FormatterHTTP Status Code LookupMIME Type LookupJS & SQL String EscapeCSS Box Shadow GeneratorCSS Gradient GeneratorIndent ConverterNumber Base ConverterUnicode Escape ConverterUnicode InspectorJSON Structure DiffMarkdown Table GeneratorBase64 EncoderJSON FormatterURL EncoderSQL FormatterCron Expression GeneratorRegex TesterUUID GeneratorHash GeneratorTimestamp ConverterJWT DecoderHTML Entity ConverterMarkdown PreviewCSS MinifierMeta Tag GeneratorJSON ↔ CSVCase ConverterImage to Base64
Explore all Dev Tools tools →Image/Media →Text/Convert →Life/Fun →