Topo calculations like gradient and sky view
Project description
topocalc
The topocalc
package is a collection of functions to calculate various metrics on a digital elevation model (DEM). The calculations follow the equations laid out in Dozier and Frew, 1990 for the gradient, horizon and sky view factor. Currently the supported calculations are:
- Gradient for slope and aspect
- Horizon angles for an azimuth
- Sky view factor for percent of the sky that is visible from a point on the DEM
Azimuth convention
For the azimuth's and aspects, the convention is that South is 0 degrees (0 radians) with positive values to the East (+90 degrees or pi/4 radians) and negative values to the West (-90 degrees or -pi/4 radians). North is -180 degrees or -pi/2.
Gradient for slope and aspect
The gradient method calculates the slope and aspect of the input DEM. There are two methods in topocalc.gradient
the gradient_d4
and gradient_d8
.
gradient_d4
mimics the slope and aspect calculations of the IPW gradient
function. This calculates the slope for a finite difference in just the x/y direction.
gradient_d8
(the default) uses a second order finite difference for a 3x3 square around a given point on the DEM.
The aspect uses the gradient to calculate the aspect from North (0 degrees). A conversion function will take the aspect in degrees and convert to radians with South being 0.
Horizon angles
The horizon angle for a point on the DEM is the angle from zenith to the horizon for a given azimuth. Following the methods laid out in Dozier and Frew, 1990 and in IPW horizon
the grid is rotated in the direction of the azimuth to make it a one dimensional problem.
For two points i
and j
, we compare the slope from i
and j
with the slope of j
's horizon. If the slope is greater, then all points past j
are not visible. If the slope is less, then all points between i
and j
don't need to be checked and the search can continue past point j
. This search is performed in C to significantly speed up the computation.
The values reported from horizon
are cosine of the horizon angle.
Sky view factor
The sky view factor (svf
) is the amount of the sky that is visible to a particular point. The svf
is between 0 and 1 with 1 indicating no obstructions from surrounding terrain and 0 indicating full obstruction. The svf
uses the slope, aspect and horizon angles for 72 directions to estimate the sky view factor for the DEM.
Command Line Interface
Comming soon!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for topocalc-0.1.9-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f7b4d48593192bad6e3ed3d97da3796344b2894fc7f747798e6c64e38b16abf |
|
MD5 | 0a3e9075a4b1a3938bb0a83e114ce8ba |
|
BLAKE2b-256 | 999d7c32a6651ad4fc820fc5505185595e302548abc48cfd5df9ba3acba12c34 |
Hashes for topocalc-0.1.9-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d322b9f20107130fd530e983ca3e3b2a86f3191df83fa40f263e5a9c3c78b766 |
|
MD5 | 113f5e5ca65e385b50e33d1e8428f1e0 |
|
BLAKE2b-256 | a34b8fd1b3ce5715785f9c0916f8703336a472f9449d4e4ec830cd0c0066df04 |
Hashes for topocalc-0.1.9-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ea62d1c405b149a67b61539410f179ccab7cb7c671a48c76ba5f3d45fd89e97 |
|
MD5 | cade5ccc27ecccfa56ef86ccd0ac3fec |
|
BLAKE2b-256 | 2413cafdde067159ec131c13678ecf252fa8edc469088348affb8206159dccd2 |
Hashes for topocalc-0.1.9-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dd99d7f34baaee48d5ce184241f3539845918ff050ce85ab340acded66b34ff |
|
MD5 | 04c7a793e43224e1f5c8a24b795d2fdb |
|
BLAKE2b-256 | f5e9f05a56923232ae7fcd9ca06ec7aee2f5f6586f008593defaf19788b50c92 |
Hashes for topocalc-0.1.9-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36f72ae5b85c4397edbf21c06d8acde547596f85c2852a28c8e22a9a9133d6b2 |
|
MD5 | b9561d0b780e0ae074183054ad2d8a41 |
|
BLAKE2b-256 | 97570fb793958c8a860611942cc84819c432a9adcbd81a2754f99c55304c3a3f |
Hashes for topocalc-0.1.9-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c42f5f563f078eef71aa3dd8d1c0b6d020057205844f59b7f664bf87841eb11 |
|
MD5 | 8256de554daf77a0b92c463785d05153 |
|
BLAKE2b-256 | 5f4717a823808cab449120d3a85a798ceec315467c2651601d66833a015eda63 |
Hashes for topocalc-0.1.9-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf7273c9ca24724a3d0f0c1b71ebd08bfd98ff7e6536ecfaf596751712097e20 |
|
MD5 | 8201bf19a81735b2ed27d1a0bf40497f |
|
BLAKE2b-256 | d93118b1839d37cb24f95354b32ca09049e744f305939d8676b1846d25752403 |
Hashes for topocalc-0.1.9-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74f73b05e30cb5da7f0f127f3e496fc8f1bac4c765caa71189d679c3aa8888a8 |
|
MD5 | 17f61ec1f0eb68fe4d12755d7a3739df |
|
BLAKE2b-256 | e5bb2ed06595871ddb30566b5ccc70a99e70664717ed9e2363bbdfc1dc6210cc |