Skip to content

Commit

Permalink
Removed pub use GDALDataType from gdal::raster.
Browse files Browse the repository at this point in the history
  • Loading branch information
metasim committed Nov 6, 2022
1 parent 97751ce commit 72e110f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
9 changes: 8 additions & 1 deletion CHANGES.md
Expand Up @@ -36,9 +36,16 @@

- <https://github.com/georust/gdal/pull/324>

- Added `GdalTypeDescriptor` to provide access to metadata and supporting routines around `GDALDataType` ordinals.
- **Breaking**: `GDALDataType` is no longer `pub use` in `gdal::raster`,
as `GdalType` and `GdalTypeDescriptor` sufficiently cover use cases in safe code.
Still accessible via `gdal_sys::GDALDataType`.

- <https://github.com/georust/gdal/pull/318>

## 0.13

- Add prebuild bindings for GDAL 3.5
- Add prebuilt bindings for GDAL 3.5

- <https://github.com/georust/gdal/pull/277>

Expand Down
2 changes: 1 addition & 1 deletion src/raster/mod.rs
Expand Up @@ -91,7 +91,7 @@ pub use rasterband::{
StatisticsMinMax,
};
pub use rasterize::{rasterize, BurnSource, MergeAlgorithm, OptimizeMode, RasterizeOptions};
pub use types::{AdjustedValue, GDALDataType, GdalType, GdalTypeDescriptor};
pub use types::{AdjustedValue, GdalType, GdalTypeDescriptor};
pub use warp::reproject;

/// Key/value pair for passing driver-specific creation options to
Expand Down
9 changes: 5 additions & 4 deletions src/raster/rasterband.rs
@@ -1,13 +1,14 @@
use crate::dataset::Dataset;
use crate::gdal_major_object::MajorObject;
use crate::metadata::Metadata;
use crate::raster::{GDALDataType, GdalType};
use crate::raster::GdalType;
use crate::utils::{_last_cpl_err, _last_null_pointer_err, _string};
use gdal_sys::{
self, CPLErr, GDALColorEntry, GDALColorInterp, GDALColorTableH, GDALComputeRasterMinMax,
GDALCreateColorRamp, GDALCreateColorTable, GDALDestroyColorTable, GDALGetPaletteInterpretation,
GDALGetRasterStatistics, GDALMajorObjectH, GDALPaletteInterp, GDALRIOResampleAlg, GDALRWFlag,
GDALRasterBandH, GDALRasterIOExtraArg, GDALSetColorEntry, GDALSetRasterColorTable,
GDALCreateColorRamp, GDALCreateColorTable, GDALDataType, GDALDestroyColorTable,
GDALGetPaletteInterpretation, GDALGetRasterStatistics, GDALMajorObjectH, GDALPaletteInterp,
GDALRIOResampleAlg, GDALRWFlag, GDALRasterBandH, GDALRasterIOExtraArg, GDALSetColorEntry,
GDALSetRasterColorTable,
};
use libc::c_int;
use std::ffi::CString;
Expand Down
3 changes: 1 addition & 2 deletions src/raster/types.rs
@@ -1,8 +1,7 @@
use crate::errors::{GdalError, Result};
use crate::utils::{_last_null_pointer_err, _string};
pub use gdal_sys::GDALDataType;
use gdal_sys::{
GDALAdjustValueToDataType, GDALDataTypeIsConversionLossy, GDALDataTypeIsFloating,
GDALAdjustValueToDataType, GDALDataType, GDALDataTypeIsConversionLossy, GDALDataTypeIsFloating,
GDALDataTypeIsInteger, GDALDataTypeIsSigned, GDALDataTypeUnion, GDALFindDataTypeForValue,
GDALGetDataTypeByName, GDALGetDataTypeName, GDALGetDataTypeSizeBits, GDALGetDataTypeSizeBytes,
};
Expand Down

0 comments on commit 72e110f

Please sign in to comment.