Skip to content

iamdonovan/dem-coregistration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binder

DEM co-registration tutorial

This repository contains a jupyter-notebook tutorial demonstrating iterative co-registration of DEMs based on the co-registration algortihm described by Nuth and Kääb (2011).

It includes two DEMs from the Jotunheimen region of Norway, one a 25 m clip of Statens Kartverk's 10m DEM (available here), the other an ASTER DEM product provided by NASA (more information here).

To use the co-registration routine with your own data, you could modify the enclosed tutorial, but you may find it easier to use the scripts and functions provided by pybob.

1. Cloning the repository

To get started with the exercises, you'll need to create a conda environment containing the packages needed to run the co-registration functions in python, and clone this repository to either your course folder on lagringshotell, or your M: drive, or your own personal computer. You can do this in one of two ways:

  1. Above this message, click the green "clone or download" button, and select "download ZIP" at the bottom of the menu. Once it's downloaded, unzip the file and move on to the next step.
  2. On the lab computers Open Git Bash (from the Start menu), then navigate to your folder for the course. Create a new folder called "python_labs" (mkdir -p python_labs), and navigate to that folder (cd python_labs). Now, execute the following command: git clone https://github.com/iamdonovan/dem-coregistration.git. You should see some messages about downloading/unpacking files, and the repository should be set up.
  3. On a computer where you have administrative access: If you have already installed git on your laptop, you can use it directly. Otherwise, install git, then clone the repository into a given folder with the command git clone https://github.com/iamdonovan/dem-coregistration.git. More information about installing and using git can be found here.

2. Creating the environment

Once you have the repository, you can create the conda environment using the environment.yml file provided. You can do this in one of the following ways, depending on which computer you're running this exercise on:

2.1 On one of the lab computers

On your M: drive, create a folder called ".conda" and a folder in ".conda" called "envs", if it does not already exist. Next, open up Anaconda Prompt, and type the following commands:

C:\> cd path\to\repository
C:\> conda env create --prefix M:\.conda\envs\geo4520 -f windows.yml

making sure to replace path\to\repository with the actual path to the git repostory you cloned in Step 1.

This will probably take some time (so feel free to catch up on Facebook or whatever kids do nowadays), but fortunately you only have to do this once (though you will have to do this again if you want to work on your personal computer). In the future, when you want to open the labs on a computer on the University network, you can just type activate M:\.conda\envs\geo4520 at the Anaconda command prompt, then navigate to the folder where you have your labs and open jupyter-notebook, without having to re-install the conda environment each time.

2.2 On a Windows computer where you have administrative access

If you haven't already, install Anaconda. Open up Anaconda Prompt, then type the following command:

C:\> conda env create --prefix geo4520 -f path\to\repository\windows.yml

making sure to replace path\to\repository\ with the actual path to the git repository you cloned in Step 1.

Once you have installed a conda environment, you can type activate geo4520 at the Anaconda Prompt, navigate to the folder where you have cloned the git repository, and type jupyter-notebook.exe to launch jupter-notebook.

2.3 On a Linux computer where you have administrative access

If you haven't already, install Anaconda. From the command line, type the following command:

conda env create --prefix geo4520 -f path/to/repository/environment.yml

making sure to replace path/to/repository/ with the actual path to the git repository you cloned in Step 1.

3. Launching the tutorial

From the command line (Anaconda Prompt on Windows), activate your conda environment if you haven't already (activate geo4520 on Windows/conda activate geo4520 on Linux). Then, navigate to the folder where you have cloned the git repository in Step 1 and launch jupyter-notebook (jupyter-notebook.exe on Windows, jupyter-notebook on Linux/Mac).