Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filling out GDALDataType metadata and utility support. #318

Merged
merged 16 commits into from Nov 10, 2022

Conversation

metasim
Copy link
Contributor

@metasim metasim commented Oct 18, 2022

  • I agree to follow the project's code of conduct.
  • I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

Primarily adds GdalTypeDescriptor for enabling runtime inspection of GDALDataType properties.

Note, potentially breaking change: 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.


image

@metasim metasim changed the title Filling out GDALDataType query support. Filling out GDALDataType metadata and utility support. Oct 23, 2022
@metasim metasim marked this pull request as ready for review October 23, 2022 14:39
Copy link
Member

@jdroenner jdroenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR adds a lot of useful functions. I think an enum would fit a bit better here. What do you think?

src/raster/types.rs Outdated Show resolved Hide resolved
src/raster/types.rs Outdated Show resolved Hide resolved
@metasim
Copy link
Contributor Author

metasim commented Oct 28, 2022

@jdroenner Thanks for the fantastic feedback! I especially appreciate knowing that the gdal_sys leakage isn't actually desired. I'll rework as an enum. 🚀

CHANGES.md Outdated Show resolved Hide resolved
script/doctest-output.sh Outdated Show resolved Hide resolved
src/raster/types.rs Outdated Show resolved Hide resolved
src/raster/types.rs Outdated Show resolved Hide resolved
src/raster/types.rs Outdated Show resolved Hide resolved
src/raster/types.rs Show resolved Hide resolved
src/raster/types.rs Outdated Show resolved Hide resolved
@metasim metasim self-assigned this Oct 31, 2022
@metasim
Copy link
Contributor Author

metasim commented Nov 7, 2022

bors r+

bors bot added a commit that referenced this pull request Nov 7, 2022
318: Filling out `GDALDataType` metadata and utility support. r=metasim a=metasim

- [x] I agree to follow the project's [code of conduct](https://github.com/georust/gdal/blob/master/CODE_OF_CONDUCT.md).
- [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users.
---

Primarily adds `GdalTypeDescriptor` for enabling runtime inspection of `GDALDataType` properties.

**Note, potentially breaking change**: `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`.

---

<img width="740" alt="image" src="https://user-images.githubusercontent.com/131013/197398449-e0c1f448-87ee-498f-b1c2-33625b08c653.png">


Co-authored-by: Simeon H.K. Fitch <fitch@astraea.io>
@bors
Copy link
Contributor

bors bot commented Nov 7, 2022

Build failed:

src/raster/types.rs Outdated Show resolved Hide resolved
src/raster/types.rs Outdated Show resolved Hide resolved
src/raster/types.rs Outdated Show resolved Hide resolved
* master:
  fmt
  Added cargo alias for displaying compiler output during doctest build.
  Fix doctest warnings.
  Disallow warnings in doctests.
@jdroenner
Copy link
Member

bors merge

@bors
Copy link
Contributor

bors bot commented Nov 10, 2022

@bors bors bot merged commit 69bf73d into georust:master Nov 10, 2022
@metasim metasim deleted the feature/cell-type++ branch November 11, 2022 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants