Skip to main content

Semi-automated modification of Digital Elevation Models

Project description

digdem

Description

digdem package can be used to modify semi-automatically Digital Elevation Models (or any raster data) in specific regions, using a limited number of control points and control profiles. It follows the following steps:

  1. Create instance of SurfMod with initial DEM, and an array specifying where the DEM will be modified;
  2. Generate controlling sections (typically longitudinal and transverse sections), and specify the new altitude of their intersections if any;
  3. Add additional control points along the sections by specifying their altitude, and if needed additional control points located within the mask but not on the sections;
  4. digdem then interpolates the new DEM within the mask by:
    • Interpolating splines along each section
    • Interpolating the new DEM with Radial Basis Functions, using points along the splines, points on the contour of the mask, and if applicable additional control points within the mask.
  5. Plot the new topography

Note that digdem is still under development, thus only minimal documentation is available at the moment, and testing is underway. Contributions are feedback are most welcome.

Installation

To install digdem from GitHub or PyPi, you'll need to have pip installed on your computer. digdem is not yet available on conda-forge.

It is strongly recommended to install digdem in a virtual environnement dedicated to this package. This can be done with virtualenv (see the documentation e.g. here). Create the environnement with :

python -m venv /path/to/myenv

and activate it, on Linux:

source /path/to/myenv/bin/activate

and on Windows:

\path\to\myenv\Scripts\activate

Alternatively, if you are more used to Anaconda :

conda create -n digdem pip
conda activate digdem

or equivalently with Mamba :

mamba create -n digdem pip
mamba activate digdem

Before installing with pip, make sure pip, steuptools and wheel are up to date

python -m pip install --upgrade pip setuptools wheel

Latest stable realease from PyPi

python -m pip install tilupy

Development version on from GitHub

Download the GithHub repository here, or clone it with

git clone https://github.com/marcperuz/tilupy.git

Open a terminal in the created folder and type:

python -m pip install .

Quick start

See jupyter notebooks in examples.

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

digdem-0.2.2.tar.gz (18.8 kB view hashes)

Uploaded Source

Built Distribution

digdem-0.2.2-py3-none-any.whl (18.3 kB view hashes)

Uploaded Python 3

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