23 releases (breaking)
0.17.1 | Sep 22, 2024 |
---|---|
0.17.0 | Jul 26, 2024 |
0.16.0 | Aug 24, 2023 |
0.15.0 | Jun 2, 2023 |
0.0.1 | Jan 21, 2015 |
#15 in Geospatial
4,280 downloads per month
Used in 19 crates
(17 directly)
4.5MB
144K
SLoC
GDAL
GDAL is a translator and processing library for various raster and vector geospatial data formats.
This crate provides safe, idiomatic Rust bindings for GDAL.
Capabilities
GDAL is an incredibly powerful library. For a general understanding of its capabilities, a good place to get started is the GDAL User-oriented documentation. These features include:
- Opening raster and vector file formats for reading/writing
- Translating between file formats
- Reading and writing metadata in raster and vector datasets
- Accessing raster bands and their metadata
- Reading and writing geospatial coordinate system and projection values
- Warping (resampling and re-projecting) between coordinate systems
Documentation
This crate's API documentation is hosted on docs.rs.
The Rust documentation is currently a work in progress, and may not cover requisite details on parameter semantics, value interpretation, etc. Therefore, the authoritative documentation is that of GDAL in the form of its C and C++ APIs. The former is technically what this crate calls, but the latter is usually more clear and better documented.
Usage
This crate provides high-level, idiomatic Rust bindings for GDAL.
To do that, it uses gdal-sys
internally, a low-level interface to the GDAL C library, which is generated using bindgen
.
Using the gdal-sys
crate directly is normally not needed, but it can be useful in order to call APIs that have not yet been exposed in gdal
.
Version support
As a general rule, only GDAL versions in Ubuntu LTS-1 (previous LTS version, that is, GDAL 3.0 in 20.04 at this moment) are supported.
gdal-sys
might support earlier versions using the bindgen
feature flag, but gdal
does not.
Building this crate assumes a compatible version of GDAL is installed with the corresponding header files and shared libraries.
This repository includes pre-generated bindings for GDAL 3.0 through 3.9 (see thegdal-sys/prebuilt-bindings
directory).
If you're compiling against another version of GDAL, you can enable the bindgen
feature flag to have the bindings generated on the fly.
Community
This crate is part of the expansive (and expanding!) georust
organization. Come join our discussions on Discord!
Contributing
This crate continues to evolve, and PRs are always welcome. Make sure you are comfortable with the Code of Conduct and License before submitting a PR.
License
This library is released under the MIT license
Dependencies
~1.8–3MB
~57K SLoC