-
Notifications
You must be signed in to change notification settings - Fork 20
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
.load() only loading overlap between scenes with HLS data? #177
Comments
@ithaca-oyler please provide replication code, what stac query you are running, how are you calling stac load etc. This certainly looks like broken nodata marker, do the data files have expected nodata field set? By default we trust nodata marker in the file over all other places. Do you get same problem when running without Dask? |
Hi @Kirill888 -- attached is a zip file that contains a sample notebook, the config file, and an example of what one of the metadata files look like. According to the metadata, the data files expect to have nodata set to -9999 (listed as FILLVALUE in the metadata). The output images shown in my previous comment are the outputs from odc.algo xr_quantile at the end of the notebook. I have tried several different combinations of setting the nodata value in the config file, as a stac.load() call, and in xr_quantile() with no good results. |
@ithaca-oyler the code does way too much and requires complex environment to run. Please provide a simpler example using single band only. My guess is that data bands work probably fine, but Fmask band is not, need to specify |
@Kirill888 Thank you for your patience while I put together a simpler example for you. I'm taking out the cloud masking step, but still making the change you suggested with specifying Here's what specifying I also decided to experiment with the And here I changed it to Do you have any thoughts as to why the output might be changing with the chunk sizes? |
Hi @Kirill888 -- a few updates. I've done a bit more debugging and I was able to determine that there were several issues contributing to my results, namely cloud masking, the no data flags I had set in my HLS config file, and needing to select the correct The fragmentation shown in my original question occurs with a combination of the nodata value in my HLS config not being set, the The end results output from Thanks a bunch! |
I'm currently using HLS data (both HLSL30.v2.0 and HLSS30.v2.0 collections) for a short time frame (5-16-2024 through 5-18-2024) and I noticed that only areas that have an overlap of both collections still have imagery in the final output. I'm at a bit of a loss as to why this may be occurring, but I suspect it may have to do with the way the lazy xarray dataset is built. I thought setting the nodata value might help (as mentioned in #162), but the output did not change. The HLS config contains information about band names, band values, cloud masking information, etc.
I am currently using odc-geo==0.4.6 and odc-stac==0.3.9.
This image shows what we expect to see:

And this image shows what is loaded in with
data = stac.stac_load(item_collection, geopolygon=roi, chunks={"x": "auto", "y": "auto","time":"auto"}, output_crs=crs, dtype='int16', resolution=30, stac_cfg=hls_cfg )
I know there are a lot of moving parts in this issue, but any insights as to why something like this might be happening will be very helpful :) Thank you!
The text was updated successfully, but these errors were encountered: