| Crates.io | raster-tools |
| lib.rs | raster-tools |
| version | 0.8.0 |
| created_at | 2021-02-25 15:17:18.495146+00 |
| updated_at | 2023-01-03 08:12:21.139579+00 |
| description | Raster processing tools |
| homepage | |
| repository | https://github.com/AspecScire/rasters.rs |
| max_upload_size | |
| id | 360480 |
| size | 131,609 |
Useful tools to process rasters. Most of these tools work on a single-band float raster that represents a scalar field (eg. a digital elevation model).
Install using cargo-install:
cargo install raster-tools
Provides the following binaries.
Computes the difference raster between two rasters. The
geo-transforms, and the dimensions of the rasters can be
different; the two rasters are aligned, and the common
region is calculated. Provides options to compute the stats,
histogram of the difference, and/or create raster with the
difference. The output raster has the same extents, and
resolution as the first input and the data is the
no-data-value (NAN) outside the common region.
Computes and fill no-data-value of a raster using a collection of points via natural-neighbors interpolation. Uses the spade crate for the interpolation.
Computes first and second order stats (mean, min, max, std.
dev.) of a raster. Optionally the stats can be computed on
region contained inside each of a list of polygons. This is
similar to gdalinfo -stats but also allows restriction by
regions.
Computes and write web mercator (EPSG:3857) tiles of a raster. The output can be served as static files, and displayed using map UI libraries like openlayers .
TODO: provide sample openlayers code to display tiles
Computes a mask that represents the location where a raster has data. For RGB rasters (i.e. if the input has 3 bands), the no-data regions are where all values are 0 or the no-data value of the first band. In other cases, the last band is considered the mask.