-
Remove the
datetime
feature -
Add
cpl::CslStringList
-
Make
gdal::rasters::OptimizeMode
public -
Added
rename
anddelete
togdal::Driver
-
Breaking: File paths must now implement
AsRef<Path>
-
Update types to fix build on ppc64le.
-
Upgrade
semver
to 1.0 and trim gdal version output inbuild.rs
. -
Breaking: Make
set_attribute_filter
andclear_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 ofFrom
to convert from gdal geometries togeo-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("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. IfNone
, it usesResampleAlg::NearestNeighbour
which was the default behavior. -
Breaking: Make
Layer::features
iterator reset to beginning, and borrow mutably.- closes georust#159
-
Breaking: Enforce borrow semantics on methods of
Dataset
,RasterBand
, andLayer
.- Methods that do not modify the underlying structure take
&self
. - Methods that modify the underlying structure take
&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)?;
- Methods that do not modify the underlying structure take
-
Breaking: Upgrade to
ndarray 0.15
-
Implement wrapper for
OGR_L_TestCapability
-
Breaking: Use
DatasetOptions
to pass asDataset::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
] implementationDataset::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 fromResult<FieldValue>
toResult<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 now implement
Debug
-
Deprecated
SpatialRef::get_axis_mapping_strategy
- migrate toSpatialRef::axis_mapping_strategy
instead. -
Add support for reading and setting rasterband colour interpretations
-
Add
Geometry::from_wkb
andGeometry::wkb
functions to convert from/to Well-Known Binary -
Fixed memory leak in
Geometry::from_wkt
-
Breaking: Changed
Dataset::create_layer
to take a newLayerOptions
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()
. UseDataset::create_layer(Default::default())
instead. -
Wrapper functions for
OGR_F_GetFieldAs…
methods -
Wrapper functions for
OGR_L_SetAttributeFilter
andOGR_L_SetSpatialFilterRect
-
Wrappers for
CPLSetThreadLocalConfigOption
andCPLGetThreadLocalConfigOption
-
Wrappers for
VSIFileFromMemBuffer
,VSIUnlink
andVSIGetMemFileBuffer
-
Add
set_description
to theMetadata
trait -
Wrappers for
GDALRasterizeGeometries
provided in a newrasters::rasterize
function -
Added
set_error_handler
andremove_error_handler
to the config module that wrapsCPLSetErrorHandlerEx
-
Breaking: Changed
Dataset::create_copy
to take a slice ofRasterCreationOption
s which was previously not included.Before:
dataset.create_copy(&driver, "output_file");
After:
dataset.create_copy(&driver, "output_file", &[]);
- fix docs.rs build for gdal-sys
- Dataset layer iteration and FieldValue types
- Fix i8 ptr instead of c_char ptr passed to OSRImportFromESRI()
- Rename spatial_reference to spatial_ref
- Replace get_extent force flag by get_extent and try_get_extent
- Add support for transactions on datasets
- Add feature_count{,_force} and implement Iterator::size_hint
- Replace failure with thiserror
- Ability to read into preallocated slice for rasterband
- Datasets are Send (requires GDAL >= 2.3)
- User GDALOpenEx
- GDAL 2.0 conform structure / drop GDAL 1.x
- Inplace functions use mutable refs
- Detect GDAL version at build time / remove version features
- Add support for delaunay_triangulation and simplify functions
- Add support for 3d points
- Additional metadata retrieval options
- Support for GDAL 3 in CI
- Support for Integer64
- Geometry Intersection trait
- Rust 2018
- support for date and time fields
- Prebuild bindings
- Support for ndarray
- Bump geo-types from 0.3 -> 0.4
- Allow reading block-size of Rasters
- Add prebuilt-bindings GDAL 2.3 and GDAL 2.4
- Make GdalType trait public
- RasterBand to Ndarray, with failure
- Migrate to the
geo-types
crate - Replace
error-chain
withfailure
- Use
bindgen
to generate the low-level bindings