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

Preserve nodata value during saving as a COG #266

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

drnextgis
Copy link
Contributor

No description provided.

@codecov-io
Copy link

codecov-io commented Jan 22, 2020

Codecov Report

Merging #266 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #266   +/-   ##
=======================================
  Coverage   90.81%   90.81%           
=======================================
  Files          38       38           
  Lines        5900     5900           
=======================================
  Hits         5358     5358           
  Misses        542      542
Impacted Files Coverage Δ
telluric/georaster.py 93.44% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99a5955...12b4d71. Read the comment docs.

@arielze
Copy link
Contributor

arielze commented Jan 23, 2020

@drnextgis please refer to this commit which changed the behavior of save_cloud_optimized, in cog files we don't preserve the nodata value, and instead create a mask_array.
b587665

please take a look how this change, influences save method, and in particular the creation of the mask_array, starting from this line:

nodata_mask = all([rasterio.enums.MaskFlags.nodata in flags for flags in self.mask_flags])

it should influence rasters that are not in memory (where the image data is not loaded), and pay particular attention to line #919.

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.

3 participants