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

Color interpretation test failure with Rasterio 1.0 and GDAL 2.2 #51

Closed
sgillies opened this issue Jul 12, 2018 · 0 comments
Closed

Color interpretation test failure with Rasterio 1.0 and GDAL 2.2 #51

sgillies opened this issue Jul 12, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@sgillies
Copy link
Contributor

sgillies commented Jul 12, 2018

This test fails, and seems to fail because the source file has no photometric interpretation explicitly set, and thus none is transferred via profile to the output file.

tmpdir = local('/private/var/folders/zq/fv6jds3j4wb_0z0zh35xky_c0000gn/T/pytest-of-sean/pytest-671/test_color_cli_16bit_photointe0')

    def test_color_cli_16bit_photointerp(tmpdir):
        output = str(tmpdir.join('color16color.tif'))
        runner = CliRunner()
        result = runner.invoke(
            color,
            ['-d', 'uint16',
             '-j', '1',
             'tests/rgb16.tif',
             output,
             "gamma 3 1.85",
             "gamma 1,2 1.95"])
        assert result.exit_code == 0

        with rasterio.open('tests/rgb16.tif') as src:
            with rasterio.open(output) as out:
                for b in src.indexes:
>                   assert out.colorinterp == src.colorinterp
E                   assert (<ColorInterp...undefined: 0>) == (<ColorInterp....terp.blue: 5>)
E                     At index 0 diff: <ColorInterp.grey: 1> != <ColorInterp.red: 3>
E                     Use -v to get the full diff

Otherwise, everything checks out with Rasterio 1.0rc5 and rio-mucho 1.0dev1.

@sgillies sgillies added the bug label Jul 12, 2018
@sgillies sgillies added this to the 1.0 milestone Jul 12, 2018
@sgillies sgillies self-assigned this Jul 12, 2018
sgillies pushed a commit that referenced this issue Jul 17, 2018
Previously we were counting on creation keyword storage that is
gone from Rasterio 1.0.

Resolves #51
sgillies added a commit that referenced this issue Jul 17, 2018
Previously we were counting on creation keyword storage that is
gone from Rasterio 1.0.

Resolves #51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant