NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io
crates.io, #5582 most downloaded on crates.io
GDAL bindings for Rust
Latest stable
0.19.0
Last release 11 months ago
23 Dec 2025
Ships fairly regularly
a new release about every 3 months
Most releases are documented
notes for 17 of 25 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
25 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
chore: Release gdal version 0.19.0
chore: Release gdal version 0.19.0
chore: Release gdal version 0.18.0
chore: Release gdal version 0.18.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
std::ffi instead of libc for C types (#573)ndarray dependency to 0.16 (#569)thiserror dependency to 2.0 (#586)Feature::field, Feature::set_field, Feature::set_field_string, Feature::set_field_string_list, Feature::set_field_double, Feature::set_field_double_list, Feature::set_field_integer, Feature::set_field_integer_list, Feature::set_field_integer64, Feature::set_field_integer64_list, Feature::set_field_datetime, Feature::set_field_null, Feature::unset_field to take a field index, not a name (#581)Feature::field_as_integer_by_name, Feature::field_as_integer64_by_name, Feature::field_as_double_by_name, Feature::field_as_string_by_name, Feature::field_as_datetime_by_name (#581)Feature::field_count to return usize instead of i32 (#581)Feature::field_as_integer, Feature::field_as_integer64, Feature::field_as_double, Feature::field_as_string, Feature::field_as_datetime to take the field index as usize instead of i32 (#581)LayerAccess::create_feature_fields (#581)Feature::geometry_by_name (#594)SpatialRef::auth_name, SpatialRef::name, SpatialRef::angular_units_name, SpatialRef::linear_units_name to return Option<String> instead of Result<String> (#589)Geometry::get_point_vec to get_points and take a &mut Vec, to reduce allocations (#600)Dataset::delete_layer (#583)Dataset::has_capability (#585)bundled feature for gdal-sys for building and statically linking a minimal bundled version of GDAL (#517)alternative_name, is_nullable, is_unique, default_value to Field (#561)Defn::geometry_type (#562)Defn::field_index and Feature::field_index (#581)Defn::geometry_field_index and Feature::geometry_field_index (#594)Dataset::has_capability for dataset capability check (#581)add_point_zm, add_point_m, set_point_zm, set_point_m, get_point_zm, get_points_zm, iso_wkt and iso_wkb to Geometry (#600)geometry_type_flatten, geometry_type_set_z, geometry_type_set_m, geometry_type_set_modifier, geometry_type_has_z and geometry_type_has_m to vector::geometry (#600)GeometryRef public (#601)ndarray when the data is offsetted from the start of the buffer (#569)Debug implementation of Geometry, in order to properly display measure values (#600)chore: Release gdal version 0.17.1
chore: Release gdal version 0.17.1
Buffer<T>::width and Buffer<T>::height (#550)Buffer<T> indexing (#550)chore: Release gdal version 0.17.0
chore: Release gdal version 0.17.0
Added pre-built bindings for GDAL 3.9
Added RasterBand::fill
Added Dataset::rasterbands.
Added no_data_value_u64, set_no_data_value_u64, no_data_value_i64 and set_no_data_value_i64 to RasterBand.
Breaking Removed RasterCreationOptionand replaced usages of [RasterCreationOption] with RasterCreationOptions, a type alias for CplStringList.
Add DriverIterator format to iterate through drivers, as well as DriverManager::all() method that provides the iterator.
Breaking: Feature::set_field_xxx now take &mut self
Breaking: Drop support for GDAL 2.x
Added DriverManager::get_output_driver_for_dataset_name and DriverManager::get_output_drivers_for_dataset_name for the ability to auto detect compatible Driver(s) for writing data.
Added Feature::unset_field
Added ability to convert between Buffer<T> and ndarray::Array2<T>.
Implemented IntoIterator, Index and IndexMut for Buffer<T>.
Breaking: Buffer<T>::size is now private and accessed via `Buffer<T>::shape().
Breaking: Buffer<T>::data is now private and accessed via `Buffer<T>::data().
Breaking: Removed RasterBand::read_as_array, changed signature of RasterBand::read_block to return a Buffer<T>.
Breaking: RasterBand::write and RasterBand::write_block now require a &mut Buffer<T> to handle possible case of drivers temporarily mutating input buffer.
Implemented Feature::set_field_null
Breaking: Changed a number of APIs using isize when usize is semantically more appropriate: Driver::create.*, RasterBand::overview, Dataset::{layer|into_layer|layer_count}.
Created enum AxisMappingStrategy for OSRAxisMappingStrategy ordinals.
Breaking: SpatialRef::{set_}axis_mapping_strategy use AxisMappingStrategy instead of gdal_sys::OSRAxisMappingStrategy::Type.
Defers the gdal_i.lib missing message until after the pkg-config check and outputs pkg-config metadata in case of a static build.
Added RasterBand::write_block.
RasterBand::read_block now checks that the requested type matches the band type.
Added Geometry::difference.
Added support for digital elevation model raster processing: aspect, color_relief, hillshade, roughness, slope, terrain_ruggedness_index, topographic_position_index.
Added pre-built bindings for GDAL 3.8
Added {Display|FromStr} for ResampleAlg and ResampleAlg::iter.
Breaking: Replaced TryFrom<&[(&str, &str); N]> for CslStringList with impl FromIterator<CslStringListEntry> for CslStringList, impl FromIterator<String> for CslStringList and impl<'a> FromIterator<&'a str> for CslStringList
Added Extend<CslStringListEntry> for CslStringList, and CslStringList::merge
Breaking: SpatialRef::set_axis_mapping_strategy now takes &mut self
Breaking: Dataset::raster_count now returns an usize and Dataset::rasterband now takes usize instead of isize
Breaking: CslStringListIterator returns a CslStringListEntry instead of (String, String) in order to differentiate between key=value entries vs flag entries.
Breaking: CslStringList::fetch_name_value returns Option<String> instead of Result<Option<String>>, better reflecting the semantics of GDAL C API.
Added CslStringList::get_field, CslStringList::find_string, CslStringList::partial_find_string, CslStringList::find_string_case_sensitive, CslStringList::into_ptr, CslStringList::add_name_value.
Breaking: ExtendedDataType no longer implements Clone, PartialEq and Eq
Breaking: Moved LayerIterator, LayerOptions and Transaction to crate::vector
Accessors MajorObject::gdal_object_ptr and Dataset::c_dataset() are no longer marked as unsafe (only using these is unsafe in idiomatic Rust)
Fixed build script error with development GDAL versions
Added raster histogram methods (setter and getter)
Fix build error on GDAL 3.1 by @lnicola in https://github.com/georust/gdal/pull/416
Dataset::close by @lnicola in https://github.com/georust/gdal/pull/420Full Changelog: https://github.com/georust/gdal/compare/v0.15.0...v0.16.0
Breaking: Dataset::close now consumes self
Gcp and GcpRef are now public
Fixed build error with GDAL 3.1
Added Geometry::flatten_to_2d
Deprecate Transaction::dataset{,_mut} in favour of Deref{,Mut} by @ttencate in https://github.com/georust/gdal/pull/265
Breaking: RasterBand::actual_block_size now takes two usize offsets instead of (isize, isize)
Added GDT_Int8 support
Added Dataset::close, changed Dataset::flush_cache to be fallible
Added SpatialRef::semi_major, semi_minor, set_proj_param, get_proj_param, get_proj_param_or_default, set_attr_value, get_attr_value and geog_cs.
Added Dataset::gcp_projection, Dataset::gcps, Dataset::set_gcps APIs
Added pre-built bindings for GDAL 3.7
Added SpatialRef::to_projjson
Added Geometry::length
Added Geometry::union
Added Geometry::from_gml
Added CoordTransform::new_with_options and CoordTransformOptions
Set the link flag of gdal-sys to "libgdal". Emit the libgdal version via cargo:version_number. Remove wrong build-dependency on gdal-sys and remove docs_rs workaround.
Added Geometry::from_geojson
Added CslStringList::add_string
Possibly breaking: Set MSRV to 1.58.
Added a TryFrom array implementation for CslStringList
Added Rasterband::c_rasterband to obtain the raw C pointer to GDALRasterBandH
Breaking: Feature::geometry returns an Option<&Geometry> instead of &Geometry. Calls to Feature::geometry will no longer panic.
Breaking: RasterBand::band_type returns the GdalDataType enum instead of GDALDataType::Type ordinal. Fixes #333
The default features of the chrono dependency are now disabled
Added prebuilt bindings for GDAL 3.6 (released 6 November 2022).
Breaking: Layer::spatial_ref returns Option instead of Result, thereby better reflecting the semantics documented in the C++ API
Exposed various functions on Geometry: make_valid, geometry_name, and point_count.
Exposed read_arrow_stream on Layer to access OGR's columnar reading API.
Exposed spatial predicates over Geometry: intersects, contains, disjoint, touches, crosses, within, and overlaps.
Added Geometry::envelope and Geometry::envelope_3d.
Added support for getting the SpatialRef of embedded ground control points (GCPs) via Dataset::gcp_spatial_ref.
Send by @ChristianBeilschmidt in https://github.com/georust/gdal/pull/238SpatialRef::from_c_obj as unsafe by @lnicola in https://github.com/georust/gdal/pull/267GDALGetRasterUnitType by @ChristianBeilschmidt in https://github.com/georust/gdal/pull/271PartialEq from GdalError by @ChristianBeilschmidt in https://github.com/georust/gdal/pull/286set_scale and set_offset to Rasterband by @msalib in https://github.com/georust/gdal/pull/294GdalError is Send by @ChristianBeilschmidt in https://github.com/georust/gdal/pull/293Rasterband::set_no_data accepting Option<f64>. by @metasim in https://github.com/georust/gdal/pull/308ResampleAlg and GDALRIOResampleAlg more direct. by @metasim in https://github.com/georust/gdal/pull/309GeoTransform by @metasim in https://github.com/georust/gdal/pull/310CplStringList. by @metasim in https://github.com/georust/gdal/pull/311byte_no_cf and cf_nasa_4326 to Zarr by @lnicola in https://github.com/georust/gdal/pull/321actions/checkout by @lnicola in https://github.com/georust/gdal/pull/322rustup instead of actions-rs/toolchain by @lnicola in https://github.com/georust/gdal/pull/327osgeo/gdal tests to complete by @lnicola in https://github.com/georust/gdal/pull/328trybuild test by @lnicola in https://github.com/georust/gdal/pull/329GDALDataType metadata and utility support. by @metasim in https://github.com/georust/gdal/pull/318fixture! implementation and enabled usage anywhere in module structure. by @metasim in https://github.com/georust/gdal/pull/342Result to Option. by @metasim in https://github.com/georust/gdal/pull/355Geometry::make_valid. by @metasim in https://github.com/georust/gdal/pull/356CslStringList From implementation with TryFrom by @lnicola in https://github.com/georust/gdal/pull/362Geometry by @metasim in https://github.com/georust/gdal/pull/366envelope* methods to Geometry. by @metasim in https://github.com/georust/gdal/pull/370vector module for better maintainability and extensibility. by @metasim in https://github.com/georust/gdal/pull/371Geometry::from_gml by @lnicola in https://github.com/georust/gdal/pull/378Geometry::length by @lnicola in https://github.com/georust/gdal/pull/384GDT_Unknown for vector layers by @lnicola in https://github.com/georust/gdal/pull/393set.rs docs to be more consistent with those in predicates.rs. by @metasim in https://github.com/georust/gdal/pull/394spatial_ref module into feature-focused submodules. by @metasim in https://github.com/georust/gdal/pull/395SpatialRef of GCPs. by @metasim in https://github.com/georust/gdal/pull/397gcp to crate:: scope. by @metasim in https://github.com/georust/gdal/pull/408Dataset::set_gcps by @lnicola in https://github.com/georust/gdal/pull/409GDT_Int8, test GDAL 3.7 on CI and refactor workflow by @lnicola in https://github.com/georust/gdal/pull/412RasterBand::actual_block_size API and replace asserts with try_into by @lnicola in https://github.com/georust/gdal/pull/4130.15 release by @lnicola in https://github.com/georust/gdal/pull/414Full Changelog: https://github.com/georust/gdal/compare/v0.11.0...v0.15.0
Increased documentation content of README and root rustdoc page. by @metasim in https://github.com/georust/gdal/pull/296
Rasterband::set_no_data accepting Option<f64>. by @metasim in https://github.com/georust/gdal/pull/308ResampleAlg and GDALRIOResampleAlg more direct. by @metasim in https://github.com/georust/gdal/pull/309GeoTransform by @metasim in https://github.com/georust/gdal/pull/310CplStringList. by @metasim in https://github.com/georust/gdal/pull/311byte_no_cf and cf_nasa_4326 to Zarr by @lnicola in https://github.com/georust/gdal/pull/321actions/checkout by @lnicola in https://github.com/georust/gdal/pull/322rustup instead of actions-rs/toolchain by @lnicola in https://github.com/georust/gdal/pull/327osgeo/gdal tests to complete by @lnicola in https://github.com/georust/gdal/pull/328trybuild test by @lnicola in https://github.com/georust/gdal/pull/329GDALDataType metadata and utility support. by @metasim in https://github.com/georust/gdal/pull/318Full Changelog: https://github.com/georust/gdal/compare/v0.13.0...v0.14.0
Added new content to README.md and the root docs.
Fixed a crash in Group::dimensions and MDArray::dimensions when no dimensions exist
Added a more ergonomic means of accessing GDAL version properties
Provided access to gdal-sys discriminant values in ResampleAlg enum.
Breaking RasterBand::set_no_data_value takes Option<f64> instead of f64 so that no no-data can be set.
Also makes it symmetric with RasterBand::no_data_value which returns Option<f64>.
Added quality-of-life features to CslStringList: len, is_empty, Debug and Iterator implementations.
Added ability to set color table for bands with palette color interpretation. Added ability to create a color ramp (interpolated) color table.
Added a wrapper for the DriverManager
Added GdalDataType to provide access to metadata and supporting routines around GDALDataType ordinals.
Breaking: GDALDataType is no longer pub use in gdal::raster,
as GdalType and GdalDataType sufficiently cover use cases in safe code.
Still accessible via gdal_sys::GDALDataType.
Added Metadata iterator.
Deprecate Transaction::dataset{,_mut} in favour of Deref{,Mut} by @ttencate in https://github.com/georust/gdal/pull/265
Send by @ChristianBeilschmidt in https://github.com/georust/gdal/pull/238SpatialRef::from_c_obj as unsafe by @lnicola in https://github.com/georust/gdal/pull/267GDALGetRasterUnitType by @ChristianBeilschmidt in https://github.com/georust/gdal/pull/271PartialEq from GdalError by @ChristianBeilschmidt in https://github.com/georust/gdal/pull/286set_scale and set_offset to Rasterband by @msalib in https://github.com/georust/gdal/pull/294GdalError is Send by @ChristianBeilschmidt in https://github.com/georust/gdal/pull/293Full Changelog: https://github.com/georust/gdal/compare/v0.12.0...v0.13.0
Add prebuilt bindings for GDAL 3.5
Breaking: Add gdal::vector::OwnedLayer, gdal::vector::LayerAccess and gdal::vector::layer::OwnedFeatureIterator. This requires importing gdal::vector::LayerAccess for using most vector layer methods.
Breaking: SpatialRef::from_c_obj is now unsafe.
Breaking: Rename Driver::get to Driver::get_by_name, add Driver::get(usize) and Driver::count
Implemented wrapper for OGR_L_SetFeature
Add programs::raster::build_vrt
Add GeoTransformEx extension trait with apply and invert
Add gdal::vector::geometry_type_to_name and gdal::vector::field_type_to_name
Add gdal::raster::rasterband::RasterBand::unit as wrapper for GDALGetRasterUnitType
Add gdal::vsi::read_dir function.
Add a ColorTable struct and RasterBand::color_table method
Add GeometryRef<'a> to reference owned nested geometry in a lifetime-safe way.
Add support for MDArray API
Add gdal::srs::CoordTransform::transform_bounds as wrapper for OCTTransformBounds for GDAL 3.4
Add Feature::set_field_*_list functions for list field types
Deprecate Transaction::dataset and Transaction::dataset_mut. Add Deref and DerefMut implementations instead.
Add methods to access raster masks and get raster mask flags. (open_mask_band, create_mask_band, and mask_flags).
Remove PartialEq from GdalError
Prevent SIGGEGV when reading a string array on an MD Array that is not of type string.
Added Geometry::to_geo method for GDAL to geo-types Geometry conversions.
Add RasterBand::set_scale and RasterBand::set_offset methods
Added program wrapper for GDALMultiDimTranslate
Test that GdalError is Send
Allow reading Dimensions from Groups in multimensional Datasets.
Added wrapper methods for GDALGetRasterStatistics, GDALComputeRasterMinMax and GDALMDArrayGetStatistics.
Added a workaround in multi-dim tests to not access files multiple times
Add prebuild bindings for GDAL 3.4
Bump Rust edition to 2021
Add prebuild bindings for GDAL 3.4
Added rename and delete to gdal::Driver
Remove the datetime feature
Add cpl::CslStringList
Make gdal::rasters::OptimizeMode public
Added rename and delete to gdal::Driver
Breaking: File paths must now implement AsRef<Path>
Nothing published for this version
Nothing published for this version
Deprecated SpatialRef::get_axis_mapping_strategy - migrate to SpatialRef::axis_mapping_strategy instead.
Update types to fix build on ppc64le.
Upgrade semver to 1.0 and trim gdal version output in build.rs.
Breaking: Make set_attribute_filter and clear_attribute_filter take &mut self
Breaking: Drop pre-build bindings for GDAL versions < 2.4. The bindgen feature can be used to generate bindings for older versions.
Fix memory leaks reported by Valgrind. This required re-generation of the pre-build bindings.
Breaking: Implement TryFrom instead of From to convert from gdal geometries to geo-types. This avoids a possible panic on unsupported geometries and returns an error instead.
Add Feature::c_feature that returns the OGR feature handle.
Add wrapper for OGR_G_Buffer.
Add support for raster dataset creation options. A new struct (RasterCreationOption) and function (driver.create_with_band_type_with_options()) are now available for this.
let driver = Driver::get_by_name("GTiff").unwrap();
let options = &[
RasterCreationOption {
key: "COMPRESS",
value: "LZW",
},
RasterCreationOption {
key: "TILED",
value: "YES",
},
];
let mut dataset = driver
.create_with_band_type_with_options::<u8>("testing.tif", 2048, 2048, 1, options)
.unwrap();
Breaking: Add support to select a resampling algorithm when reading a raster
Now, it is necessary to provide a Option<ResampleAlg> when reading a raster.
If None, it uses ResampleAlg::NearestNeighbour which was the
default behavior.
Breaking: Make Layer::features iterator reset to
beginning, and borrow mutably.
Breaking: Enforce borrow
semantics on
methods of Dataset, RasterBand, and Layer.
&self.&mut self.let ds = Dataset::open(...);
// ds need not be mutable to open layer
let mut band = ds.rasterband(1)?;
// band needs to be mutable to set no-data value
band.set_no_data_value(0.0)?;
Breaking: Upgrade to ndarray 0.15
Implement wrapper for OGR_L_TestCapability
Breaking: Use DatasetOptions to pass as Dataset::open_ex parameters and
add support for extended open flags.
use gdal::{ Dataset, DatasetOptions }
let dataset = Dataset::open_ex(
"roads.geojson",
DatasetOptions {
open_flags: GdalOpenFlags::GDAL_OF_UPDATE|GdalOpenFlags::GDAL_OF_VECTOR,
..DatasetOptions::default()
}
)
.unwrap();
GDALAccess values are supported using [From] implementation
Dataset::open_ex(
"roads.geojson",
DatasetOptions {
open_flags: GDALAccess::GA_Update.into(),
..DatasetOptions::default()
},
)
.unwrap();
Add more functions to SpatialRef implementation
Breaking: Change Feature::field return type from
Result<FieldValue> to Result<Option<FieldValue>>. Fields
can be null. Before this change, if a field was null, the value
returned was the default value for the underlying type.
However, this made it impossible to distinguish between null
fields and legitimate values which happen to be default value,
for example, an Integer field that is absent (null) from a 0,
which can be a valid value. After this change, if a field is
null, None is returned, rather than the default value.
If you happened to rely on this behavior, you can fix your code by explicitly choosing a default value when the field is null. For example, if you had this before:
let str_var = feature.field("string_field")?
.into_string()
.unwrap();
You could maintain the old behavior with:
use gdal::vector::FieldValue;
let str_var = feature.field("string_field")?
.unwrap_or(FieldValue::StringValue("".into()))
.into_string()
.unwrap();
Fixed potential race condition wrt. GDAL driver initialization
Add basic support to read overviews
Added a Dataset::build_overviews method
BREAKING: update geo-types to 0.7.0. geo-types Coordinate<T> now implement Debug
Deprecated SpatialRef::get_axis_mapping_strategy - migrate to
SpatialRef::axis_mapping_strategy instead.
Add support for reading and setting rasterband colour interpretations
Add Geometry::from_wkb and Geometry::wkb functions to convert from/to
Well-Known Binary
Fixed memory leak in Geometry::from_wkt
Breaking: Changed Dataset::create_layer to take a new LayerOptions
struct instead of separate arguments.
Before:
ds.create_layer("roads", None, wkbLineString)
After (all fields have usable default values):
use gdal::LayerOptions;
ds.create_layer(LayerOptions {
name: "roads",
ty: wkbLineString,
..Default::default()
});
This change also removed Dataset::create_layer_blank(). Use
Dataset::create_layer(Default::default()) instead.
Wrapper functions for OGR_F_GetFieldAs… methods
Wrapper functions for OGR_L_SetAttributeFilter and OGR_L_SetSpatialFilterRect
Wrappers for CPLSetThreadLocalConfigOption and CPLGetThreadLocalConfigOption
Wrappers for VSIFileFromMemBuffer, VSIUnlink and VSIGetMemFileBuffer
Add set_description to the Metadata trait
Wrappers for GDALRasterizeGeometries provided in a new rasters::rasterize function
Added set_error_handler and remove_error_handler to the config module that wraps CPLSetErrorHandlerEx
Breaking: Changed Dataset::create_copy to take a slice of RasterCreationOptions which was previously not included.
Before:
dataset.create_copy(&driver, "output_file");
After:
dataset.create_copy(&driver, "output_file", &[]);
Nothing published for this version
- fix docs.rs build for gdal-sys -
Nothing published for this version
Dataset layer iteration and FieldValue types
Allow reading block-size of Rasters
Migrate to the `geo-types` crate
Add support for creating a SpatialRef from a esri "wkt" definition
First version of metadata handling
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.