• Stars
    star
    110
  • Rank 314,945 (Top 7 %)
  • Language
    Jupyter Notebook
  • License
    MIT License
  • Created almost 8 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Utilities for DEM and point cloud co-registration

DOI

demcoreg

Python and shell scripts for co-registration of rasters, specifically horizontal and vertical alignment of digital elevation models (DEMs).

Overview

All DEMs have some horizontal and vertical geolocation error. It is important to remove relative offsets when differencing DEMs for elevation change analyses. These tools offer several options to solve this problem. Most solve for the sub-pixel horizontal shift and vertical offset required to minimize errors over "static" control surfaces. The ASP pc_align tool can also solve for more complex transformations with rotations and scaling.

Features

  • Multiple co-registration algorithms:
  • Command-line utilities for raster differencing with necessary resampling (compute_diff.py), raster stats (robust_stats.py), and raster sampling at point locations (sample_raster_at_pts.py)
  • Mask preparation and automatic determination of static control surfaces (i.e., exposed bedrock) for a user-specified combination of:

Some useful command-line utilities (run with -h option for complete usage)

  • dem_align.py - robust raster DEM co-registration (e.g., Nuth and Kaab [2011]) for surfaces with variable slope and aspect (e.g., mountains)
  • dem_mask.py - pre-generate mask to identify "stable" surfaces to use during co-registration
  • pc_align_wrapper.sh - wrapper around NASA Ames Stereo Pipeline pc_align utility for iterative closest point co-registration
  • apply_dem_translation.py - update raster geotransform and remove vertical offset
  • compute_diff.py - simple DEM difference calculation with intuitive resampling options
  • robust_stats.py - print out robust raster statistics (e.g,. for DEM difference map before/after co-registration)

Sample output

dem_align.py

Sample command: dem_align.py ref_dem.tif src_dem.tif Sample dem_align Nuth and Kaab plot

dem_mask.py

Sample command: dem_mask.py --toa --bareground --glaciers src_dem.tif Sample dem_mask

filter_glas.py output

Sample filter_glas

Example applications

High-mountain Asia

Pine Island Glacier, Antarctica

Installation

We are hoping to clean up the code, remove unnecessary dependencies, and streamline installation using conda. For now, we recommend following the "Building from Latest Source" instructions below, to obtain latest features/bugfixes.

If unfamiliar with this process, or if you are new to Python, bash, and/or git/github, start with these more detailed instructions and notes: Beginner's guide for installation and basic usage

Building from Latest Source (recommended)

  1. Assuming you have working Python3 install with GDAL and NumPy, install pygeotools
  2. Clone the demcoreg repository: git clone https://github.com/dshean/demcoreg.git
  3. Perform developer install with pip: pip install -e demcoreg
    • The -e flag ("editable mode", setuptools "develop mode") will allow you to modify source code and immediately see changes. Useful if you need to make minor tweaks or bugfixes (please submit a Pull Request!)
  4. Optionally, append the demcoreg subdirectory containing scripts to your PATH: export PATH=${PATH}:$PWD/demcoreg/demcoreg (replacing $PWD with the absolute path to the cloned demcoreg repository)
    • To make this permanent, add that line to your shell config file (e.g., ~/.bashrc).

Simple install with PyPI

pip install demcoreg

Documentation

http://demcoreg.readthedocs.io (autogenerated from source code, may be out of date)

License

This project is licensed under the terms of the MIT License.

Citation

If you use any of this software for research applications that result in publications, please cite:
Shean, D. E., O. Alexandrov, Z. Moratto, B. E. Smith, I. R. Joughin, C. C. Porter, Morin, P. J., An automated, open-source pipeline for mass production of digital elevation models (DEMs) from very high-resolution commercial stereo satellite imagery, ISPRS J. Photogramm. Remote Sens, 116, 101-117, doi: 10.1016/j.isprsjprs.2016.03.012, 2016.

More Repositories

1

pygeotools

A collection of libraries and utilities for geospatial data processing/analysis
Python
85
star
2

sfm_tools

A collection of tools for planning, geotagging, and processing photos for Structure from Motion (SfM)
Python
23
star
3

nasadem

Scripts to download and process the NASADEM SRTM and TanDEM-X products
Shell
22
star
4

tandemx

Scripts for processing the TanDEM-X global mosaic
Jupyter Notebook
21
star
5

icesat_tools

Scripts for processing NASA ICESat and ICESat-2 satellite laser altimetry data
Python
19
star
6

vmap

Surface velocity map generation using ASP's multithreaded image feature tracking
Python
17
star
7

hma_mb_paper

Data, notebooks, scripts and notes for Shean et al. (2020) paper on High-Mountain Asia glacier mass balance
Jupyter Notebook
12
star
8

gmbtools

DEM processing and geodetic mass balance calculation for mountain glaciers
Jupyter Notebook
11
star
9

snowtools

Utilities for working with snow data
Python
10
star
10

iceflow

All the things
Python
7
star
11

stereohack

Repo for code, notes, documentation from adventures with the Ames Stereo Pipeline during geohackweek2016
Python
6
star
12

glacierhack2017

Code and notes for the 2017 UW eScience geohackweek GlacierHack project
JavaScript
5
star
13

imview

Matplotlib Image viewers for geospatial data
Python
4
star
14

pig_dem_meltrate

Scripts to correct DEMs, combine with velocity/tide/SMB, and compute basal melt rate for PIG
Python
3
star
15

planet_tools

Utilities and libraries for Planet data
Jupyter Notebook
3
star
16

ibutton

Utility to parse and plot data from Maxim iButton temperature logger
Python
2
star
17

gpri_scripts

Scripts for processing and analyzing data from the GAMMA portable radar interferometer
Python
1
star
18

gdal_tools

General command line utilities based on GDAL/OGR that don't fit in other repos
Python
1
star
19

tls_tools

Random scripts for terrestrial laster scanner (ground-based LiDAR)
Python
1
star