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

Enabled non-consuming fallible conversion from GDAL to geo-types Geometry #295

Merged
merged 6 commits into from
Sep 3, 2022

Conversation

metasim
Copy link
Contributor

@metasim metasim commented Aug 31, 2022

Also added Geometry::to_geo method, for symmetry with ToGdal::to_gdal.

  • 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.

Closes #276

…ypes Geometry.

Added `to_geo` method, symmetric to the method `to_gdal` from `ToGdal`.
Fixed CHANGES.md conflict.
impl TryFrom<Geometry> for geo_types::Geometry<f64> {
type Error = GdalError;
fn try_from(value: Geometry) -> Result<Self, Self::Error> {
TryFrom::<&Geometry>::try_from(&value)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
TryFrom::<&Geometry>::try_from(&value)
Self::try_from(&value)

Copy link
Member

Choose a reason for hiding this comment

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

Is my suggestion somehow wrong?

I'm a bit confused, you 👍ed it, marked it as resolved, but didn't change the code.

Copy link
Contributor Author

@metasim metasim Sep 2, 2022

Choose a reason for hiding this comment

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

@lnicola I forgot to push 🤦 . I'm recovering from The Covid, and not only forgot to push, but did the "resolved" in the wrong order. My apologies.

Copy link
Member

Choose a reason for hiding this comment

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

No worries, and good luck with your recovery!

…to_geo

* commit '604c41fbf62b96d0b44a14606b6f83b37db8059e': (29 commits)
  (cargo-release) version 0.13.0
  (cargo-release) version 0.7.0
  bump changelog version
  use `TempFixture` for rasterband get_statistics test
  test util with `TempFixture`
  changelog entry
  use tempfiles to not access file multiple times
  Require matching data types in MDArray::read_into_slice
  wrap test in inner block to remove some drops
  Update src/raster/mdarray.rs
  Move error handling test to an integration test
  changelog entry
  enforce that GdalError is `Send`
  added changes to CHANGES.md
  get_statistics for rasterbands and md rasters
  remove uses of `addr_of_mut`
  make unsafe regions smaller
  fixed wrong error method name
  more convenience functions
  allow empty dimensions
  ...
@metasim metasim requested a review from lnicola September 2, 2022 18:58
@lnicola
Copy link
Member

lnicola commented Sep 3, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 3, 2022

Build succeeded:

@bors bors bot merged commit 875d644 into georust:master Sep 3, 2022
@metasim metasim deleted the feature/to_geo branch November 13, 2022 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exposing gdal_to_geo
2 participants