Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A certain combination of parameters leads to unexpected results

See original GitHub issue

Issue Description

I would expect to get the same set of mask_flags for Case 4 as for the rest of the cases. Am I missing something or it is a bug?

$ rio info original.tif | jq -c .mask_flags,.nodata

🟢 Case 1


$ rio cogeo create --add-mask original.tif cogeo1.tif
$ rio info cogeo1.tif | jq -c .mask_flags

🟢 Case 2

--add-mask --web-optimized

$ rio cogeo create --add-mask --web-optimized original.tif cogeo2.tif
$ rio info cogeo2.tif | jq -c .mask_flags                           

🟢 Case 3

--add-mask --use-cog-driver

$ rio cogeo create --add-mask --use-cog-driver original.tif cogeo3.tif
$ rio info cogeo3.tif | jq -c .mask_flags  

🔴 Case 4

--add-mask --use-cog-driver --web-optimized

$ rio cogeo create --add-mask --use-cog-driver --web-optimized original.tif cogeo4.tif
$ rio info cogeo4.tif | jq -c .mask_flags 

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

drnextgiscommented, Jul 16, 2021

@vincentsarago you can reproduce it with publicly available dataset:

$ rio cogeo create --add-mask --use-cog-driver --web-optimized \
/vsicurl/\?raw\=true rasterio.tif
$ rio info rasterio.tif | jq -c .mask_flags 
drnextgiscommented, Jul 16, 2021

It works fine. At least it doesn’t produce an alpha band which is my main problem.

$ gdalinfo --version
GDAL 3.4.0dev-8dddba9d9065bf0a2f41be1282ff2dba79c21797, released 2021/06/16

$ gdalwarp -of VRT -dstalpha original.tif out.vrt
Creating output file that is 8366P x 10042L.
Processing original.tif [1/1] : 0Using internal nodata values (e.g. 0) for image original.tif.
...10...20...30...40...50...60...70...80...90...100 - done.

$ gdal_translate -of COG -mask 4 out.vrt out.tif
Input file size is 8366, 10042
0...10...20...30...40...50...60...70...80...90...100 - done.

$ rio info out.tif | jq -c .mask_flags  
Read more comments on GitHub >

github_iconTop Results From Across the Web

Parameter Types - Ivanti
A Credentials parameter is a combination of domain\username and password. ... it may lead to unpredictable results when linking in Projects and Run...
Read more >
Snakemake expand is generating unexpected combinations ...
In my rule all, I use expand and zip to create a list of target files; however, I'm encountering an error in which...
Read more >
Unexpected Results in Chromatography - AWS
These basic experiments will show how different starting run conditions affect peak retention times (direction of movement in the chromatogram).
Read more >
2143-Examples of Basic Requirements of a Prima Facie Case ...
(3), a proper rejection based on the rationale that the claimed invention is a combination of prior art elements also includes a finding...
Read more >
Measurements and Error Analysis - WebAssign
The process of evaluating the uncertainty associated with a measurement result is often called uncertainty analysis or error analysis.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found