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:
- Create instance of
SurfMod
with initial DEM, and an array specifying where the DEM will be modified; - Generate controlling sections (typically longitudinal and transverse sections), and specify the new altitude of their intersections if any;
- 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;
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.
- 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
digdem
can be installed from GitHub, PyPi or Anaconda. Supposedly stable releases are distributed to PyPi and Anaconda. Distribution to Anaconda is made manually from the PyPi package, thus the last available version on conda-forge may be an older version than the one distributed on PyPi.
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
Latest stable release from Anaconda
With Anaconda:
conda install digdem
or equivalently with Mamba:
mamba install digdem
Latest stable realease from PyPi
Before installing with pip
, make sure pip
, steuptools
and wheel
are up to date
python -m pip install --upgrade pip setuptools wheel
Then run
python -m pip install digdem
Development version on from GitHub
Download the GithHub repository here, or clone it with
git clone https://github.com/marcperuz/digdem.git
Open a terminal in the created folder and type:
python -m pip install .
If you want to developp and test digdem
and have your modification directly taken into account when running your code, use:
python -m pip install -e .
Alternatively, if you don't want to install the package with pip, you can also add the src
folder to your Python path.
Quick start
See jupyter notebooks in examples.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file digdem-0.2.3.tar.gz
.
File metadata
- Download URL: digdem-0.2.3.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 827dd15f385d7051572d3cf3673af58991237778b7b63bd2e3d867890da82b6f |
|
MD5 | 04ff9f3ff6210da49fc2fc7e3103d428 |
|
BLAKE2b-256 | 6ec02bf63e7e05cb79198dbf96bf58d0ece76c17377f875e019bec267cf3fe5f |
File details
Details for the file digdem-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: digdem-0.2.3-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 876c41582af0700e93bf3bbdd8bcb734deb3ca0a72ecc24985f15024bcb3dfc9 |
|
MD5 | f720ed832ddcab76cb3dcc90ed1e56c2 |
|
BLAKE2b-256 | 06636973a001417aa037b764002c8373ea5fa3d1bd5cebef6bd26041ad073384 |