Topographic Horizons

Computes the angles to the horizons from an elevation grid, measured in degrees upward from the horizontal, with options for parallelism.
109 Downloads
Updated 19 Aug 2022

View License

This set of functions, based on a paper submitted to IEEE Geoscience and Remote Sensing Letters [1], computes the angles to the horizons from an elevation grid, measured in degrees upward from the horizontal. The one-dimensional problem uses an order N algorithm [2]. Horizons for arbitrary azimuths are derived by rotating the elevation grid, then calculating the horizons along the columns of the rotated grid and re-rotating the grid back to its original orientation. The code supports grids in either projected or geographic format; it also calculates the distances to the horizon. One of the demo illustrations uses my Sun Position toolbox, but the needed functions are included here too.
[1] J. Dozier, Revisiting the topographic horizon problem in the era of big data and parallel computing, IEEE Geosci. Remote Sens. Lett., 2022, doi: 10.1109/LGRS.2021.3125278.
[2] J. Dozier, J. Bruno, and P. Downey, "A faster solution to the horizon problem," Comp. Geosci., 7, 145-151, 1981, doi: 10.1016/0098-3004(81)90026-1.

Cite As

Jeff Dozier (2024). Topographic Horizons (https://www.mathworks.com/matlabcentral/fileexchange/94800-topographic-horizons), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2022a
Compatible with R2019a and later releases
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Sun Position

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
4.4.2

updated to correspond with documentation and DOI of the published paper

4.4.1

Fixed a bug to make sure that the kernel size in smooth3 is odd.

4.4

Corrected some comments. Streamlined the writeHorizon function.

4.3

Improved the demos. Added the citation to the journal paper that has now been accepted.

4.2

updated the geotiff option in the Storage function writeHorizon

4.1.1

fixed a typo in the Description

4.1

Several performance improvements, added NetCDF option to the storage possibilities.

4.0

Addressed a problem in viewFactor when slope is steep enough to hide some horizons.
Also fixed some comments/documentation.

3.0

Simplified the demo to make the package a lot smaller. Identified the MATLAB toolboxes needed.

2.0