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

added additional metadata retrieval options. #88

Merged
merged 3 commits into from
Oct 29, 2020

Conversation

hamersaw
Copy link
Contributor

Allows listing all domains for the specified Metadata and retrieving the strings for a given domain.

@jdroenner
Copy link
Member

Hi, sorry for the delay, Could you add a test for each method?

@jdroenner
Copy link
Member

thanks for the tests. Sadly, GDAL 2 and GDAL 3 have a different behavior. The CI fails for GDAL 2 with:

thread 'raster::tests::test_get_metadata_domains' panicked at 'assertion failed: `(left == right)`

 left: `["IMAGE_STRUCTURE", "xml:XMP", "DERIVED_SUBDATASETS", "COLOR_PROFILE"]`,

right: `["", "IMAGE_STRUCTURE", "xml:XMP", "DERIVED_SUBDATASETS", "COLOR_PROFILE"]`', src/raster/tests.rs:133:5

could you provide two lists to compare the result with? you can use #[cfg(major_is_2)] and #[cfg(major_ge_3)] for conditional compilation.

@hamersaw
Copy link
Contributor Author

It looks like it may be a compilation flag. Tests for version 2 on Mac seem to work in travis-ci. I tested with gdal versions 2.4.4, 3.0.4, and 3.1.3 installed from source on my debian testing install and they all include the leading "" domain.

Is it enough to remove the leading "" if it exists and ensure the remaining 4 domains exist? I don't believe it will be possible to exhaustively conditionally compile tests for full coverage given functionality difference for the same gdal versions.

@jdroenner
Copy link
Member

this is strange. i guess removing the "" is the best way to go.

@jdroenner jdroenner mentioned this pull request Oct 29, 2020
4 tasks
@jdroenner jdroenner merged commit 2817729 into georust:master Oct 29, 2020
@hamersaw hamersaw deleted the feature-metadata-domain branch October 29, 2020 15:25
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.

None yet

2 participants