$ show opengeos/lidar
This repository provides the `lidar` Python package, a specialized library for hydrological depression analysis of high-resolution topographic data, particularly LiDAR-derived DEMs. Its core functionality includes DEM smoothing (mean, median, Gaussian filters), sink extraction, and a novel level-set algorithm for delineating nested depression hierarchy, yielding topological and geometric properties (size, volume, depth, perimeter). The package is designed as a reusable library with a CLI (`lidar` command), a PySimpleGUI-based graphical interface, and integration with ArcGIS via a dedicated toolbox. It also includes Jupyter notebooks for tutorial and research workflows, demonstrating the complete analysis pipeline. The project is research-grade, backed by peer-reviewed publications, and follows a modular architecture with separate modules for filtering, filling, slicing, and mounts. However, some dependencies (GDAL, arcpy) and Python version constraints introduce moderate technical drift risk.
The LLM identified 2 files worth highlighting for reuse:
Implements the core level-set algorithm for delineating nested depressions in DEMs. The `DelineateDepressions` function (and associated `Depression` class) computes depression hierarchy, topological relationships, and geometric attributes. This algorithm is the primary research contribution and is reusable in any terrain analysis workflow requiring depression hierarchy extraction. It is self-contained, requires only numpy/richdem inputs, and demonstrates non-obvious graph-theoretic skill.
Provides `ExtractSinks` and variants (`ExtractSinks_HUC8`, `ExtractSinks_BBox`) for identifying and extracting sink/depression features from DEMs. These functions are parameterized by minimum size and depth, and output both raster and vector formats. The component is reusable across different DEM datasets and integrates well with the filtering and slicing modules. It demonstrates clean geospatial extraction logic and handles large raster data efficiently.