https://github.com/nens/raster-tools
Collection of cli tools for raster-processing.
https://github.com/nens/raster-tools
Last synced: 2 months ago
JSON representation
Collection of cli tools for raster-processing.
- Host: GitHub
- URL: https://github.com/nens/raster-tools
- Owner: nens
- License: gpl-3.0
- Created: 2014-01-15T13:47:35.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2025-04-25T13:14:37.000Z (3 months ago)
- Last Synced: 2025-04-25T14:27:36.499Z (3 months ago)
- Language: Python
- Size: 701 KB
- Stars: 6
- Watchers: 33
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE.rst
Awesome Lists containing this project
README
raste-tools
============A collection of raster tools.
Docker installation
------------------------For development, you can use a docker-compose setup::
$ docker compose build --build-arg uid=`id -u` --build-arg gid=`id -g`
$ docker compose up --no-start
$ docker compose start
$ docker compose exec lib bashNote that the /mnt folder is already mapped to the host mount.
Filling nodata in rasters
-------------------------Use fillnodata to fill nodata regions in rasters. The input to the algorithm is
the edge surrounding the region. The raster saved as the target argument only
contains the complementary cells.Rasterizing landuse tables
--------------------------For rasterization of landuse tables from a postgres datasource a special
wrapper command is available at bin/rasterize-landuse, use --help for args.Creating streamlines
--------------------Run the following scripts for streamline calculation::
flow-fil # depression filling
flow-dir # direction calculation
flow-acc # accumulation
flow-vec # make shapefiles
flow-rst # make rasters from shapefilesStreamlines have been rasterized in the past to be able to visualize them with
good performance on any zoomlevel. A number of tricks can be to make them look
like a vector dataset:- Rasterize at sufficiently high resolution so that supersampling is never
needed
- (Pre)aggregate using a `maximum` algorithm for lower resolutions
- Use binary dilation after serving image tiles on one or more higher classes
to create a 'wider stroke' effectMultiprocessing
---------------A number of scripts have a ``--part`` option to run the script on a subset of the
source features, e.g. --part=2/3 to run on the second part of three parts. To
use xargs to run some script for example on 4 processes, use::xargs -a <(echo -e '1/4\n2/4\n3/4\n4/4') -L 1 -P 4 your_script --your_args --part