-
Notifications
You must be signed in to change notification settings - Fork 3
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
Grid cells that lack data set to 0 rather than pulling nodata_val
from config
#16
Comments
UpdateI branched both This worked for the rasters (and therefore the web tiles) that represent the polygons. But this approach didn't succeed in removing the yellow layer that stretches from prime meridian to antimeridian. I did a test run on the first 5000 polygons in one of the lake change files, with the |
The web tiling step fails at the step in the terminal:
and in the log:
A deeper look into the error reveals that it occurs at the specified line because there are still remaining |
"Middle" value in the palette is assigned to non-tiled area rendered by CesiumAs pictured above, a confusing solid-color layer expands across half of the world when I visualize the lake size change dataset. Importantly, this layer does not obscure the polygons themselves or even the area immediately around the polygons that's within the tiles produced by the workflow. Rather, the solid layer is present just in the area outside of the polygon tiles. In the palette specified in this config, I "manually" assign a number of colors Ingmar suggested (rather than using a palette name) that span from the smallest value in the dataset (specified as -2 in the Also, it goes without saying that the number of tiles is very small for these samples I am processing, and the number of tiles increases as I increase the number of polygons as input (of course, this has always been the case). I mention this to emphasize that if the workflow was producing all the colors we see in cesium, the number of tiles would be huge because the color cover half the earth, and the number would remain consistent because the color visualized in cesium covers half the earth no matter how many polygons I input. This all leads me to believe that the solid layer covering half the earth is partially due to how ceisum is reading my input. Why is cesium reading my 0-value ("middle" color) and applying it to the non-tiled area when I use a non-0 |
!!! See code here for resampling rasters |
Nice find! |
After playing around with the
Unfortunately, when the merged raster is output, it does indeed have some values of 0 (for the lower-res rasters). It also has values that match the I started exploring the differences in intermediate outputs when input data to the workflow includes |
Note: Looking into But just afterwards, this step seems to populate the cells in the array with the nodata value, but only if it is in range. Perhaps the values we have been testing for the nodata value are not in range... |
Looks like a very probable solution to me! |
Update: Cloned repo for I edited the
To match my testing viz-workflow script that specifies the |
The progress I have made towards this bug fix exists in 2 branches, one for The reason I have a branch in both repos for the same issue is that the bug fix requires changes to both repos because |
In
viz-raster/Raster.py
,__as_array()
assigns 0 to all grid cells that lack data here. Instead, thisfill_value
should be pulled from the config, which allows users to specify an integer, float,None
, ornp.nan
.This bug was identified while processing Ingmar's lake change data. In this dataset, the visualized attribute has a range of negative to positive values that communicates the rate of lake size change. Therefore, 0 is not a valid
nodata_val
because it is a real value in the data that means no change. When processing the data with thefill_value
hard coded to 0, but with anodata_val
in the config set to any of the options besides 0, the resulting data is visualized obviously incorrectly (see the lake change issue here).The text was updated successfully, but these errors were encountered: