Skip to main content

A package for topographic complexity analysis

Reason this release was yanked:

bug included

Project description

pyTopoComlexity (v0.7.2)

DOI

pytopocomplexity is an open-source Python package designed to measure the topographic complexity (i.e., surface roughness) of land surfaces using digital elevation model (DEM) data. This package includes modules for three methods commonly used in the fields of geomorphology and oceanography for measuring topographic complexity, which are not fully available in Geographic Information System (GIS) software like QGIS.

Modules Method Descriptions
pycwtmexhat.py Quanitfy the wavelet-based curvature of the land surface using two-dimensional continuous wavelet transform (2D-CWT) with a Mexican Hat wevalet
pyfracd.py Conduct fractal dimension analysis on the land surface
pyrugostiy.py Calculate rugosity indext of the land surface

Installation

pip install pytopocomplexity

Modules for Surface Complexity Measurement

1. pycwtmexhat: 2D Continuous Wavelet Transform Method

from pytopocomplexity import pycwtmexhat

The module pycwtmexhat uses two-dimensional continuous wavelet transform (2D-CWT) with a Mexican Hat wevalet to measure the topographic complexity (i.e., surface roughness) of a land surface from a Digital Elevation Model (DEM). Such method quanitfy the wavelet-based curvature of the surface, which has been proposed to be a effective geomorphic metric for identifying and estimating the ages of historical deep-seated landslide deposits.

The method and early version of the code was developed by Dr. Adam M. Booth (Portland State Univeristy) in 2009, written in MATLAB (Source code available from Booth's personal website). This MATLAB code was later revised and adapted by Dr. Sean R. LaHusen (Univeristy of Washington) and Dr. Erich N. Herzig (Univeristy of Washington) in their research (LaHusen et al., 2020; Herzig et al. (2023)). Dr. Larry Syu-Heng Lai (Univeristy of Washington), under the supervision of Dr. Alison R. Duvall (Univeristy of Washington), translated the code into this optimized open-source Python version in 2024.

2. pyfracd: Fractal Dimentsion Analysis

from pytopocomplexity import pyfracd

The pyfracd module calculates local fractal dimensions to assess topographic complexity. It also computes reliability parameters such as the standard error and the coefficient of determination (R²). The development of pyfracd is made possible through the gratitude of Dr. Eulogio Pardo-Iguzquiza, who kindly shared his Fortran code used in his recent publication Pardo-Igúzquiza and Dowd (2022).

The local fractal dimension is determined by intersecting the surface within a moving window with four vertical planes in principal geographical directions, simplifying the problem to one-dimensional topographic profiles. The fractal dimension of these profiles is estimated using the variogram method, which models the relationship between dissimilarity and distance using a power-law function. While the fractal dimension value does not directly scale with the degree of surface roughness, smoother or more regular surfaces generally have lower fractal dimension values (closer to 2), whereas surfaces with higher fractal dimension values tend to be more complex or irregular. This method has been applied in terrain analysis for understanding spatial variability in surface roughness, classifying geomorphologic features, uncovering hidden spatial structures, and supporting geomorphological and geological mapping on Earth and other planetary bodies.

3. pyrugosity: Rugosity Index

from pytopocomplexity import pyrugosity

The module pyrugosity measure rugosity index of the land surface, which is widely used to assess landscape structural complexity. The development of this module is influenced by another open-source tool Rugosity_Calculator created by drk944.

The rugosity index is determined as the ratio of the real surface area to the geometric surface area, highlighting smaller-scale variations in surface height. This module adapt triangulated irregular networks method (Jenness, 2004), which approximate the surface area of with within each 9 cell as the sum of 8 truncated-triangle area connecting each cell centerpoint with the centerpoints of the 8 surrounding cells. The geometric surface area is assumed to be the planimetric area of the center cell. By definition, the rugosity index is as a minimum value of one (completely flate surface). Typical valuesrange from one to three although larger values are possible in very steep terrains. Such method has been applied in classifying seafloor types by marine geologists and geomorphologist, small-scale hydrodynamics by oceanographers, and studying available habitats in the landscape by ecologists and coral biologists.

Requirements

For pytopocomplexity package

  • Python >= 3.10
  • os
  • numpy
  • scipy
  • rasterio
  • dask
  • matplotlib
  • tqdm
  • numba

License

pyTopoComlexity is licensed under the Apache License 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytopocomplexity-0.7.2.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

pytopocomplexity-0.7.2-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file pytopocomplexity-0.7.2.tar.gz.

File metadata

  • Download URL: pytopocomplexity-0.7.2.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for pytopocomplexity-0.7.2.tar.gz
Algorithm Hash digest
SHA256 c75ed7209b669dc7c9d1dfb1c9db9cdfc27942694bced31e5116509feea5cb34
MD5 5cf1625792fd9095cf5052e2b0774a78
BLAKE2b-256 d9b3e3f9ff703a6e214a4367527ecb5d8745c4cfb4bfe4b131cdf309cbb6a9f9

See more details on using hashes here.

File details

Details for the file pytopocomplexity-0.7.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pytopocomplexity-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e0a28ff292a8ada374917a2ebc307d06e540364eae8781be7260a63f5a9d1d73
MD5 ba24a672bb67102cbe4d6d8b0419942e
BLAKE2b-256 d2462934a55b5c45a3625b2cf6ddd3382935107c52dd8d8844c0dcc7f0e2cf7d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page