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

Make STAC -> ODC conversion more robust to missing extension data #351

Merged
merged 6 commits into from
Sep 6, 2021

Conversation

Kirill888
Copy link
Member

Support for Collection -> Product

  • If you have STAC Collection that includes "Item Assets" extension then you can create Datacube product from that.
  • If Item Assets include EO extension then common_name will be used to generate aliases
  • If Item Assets include Raster extension then dtype,nodata will be read from that

Support for STAC Items without Projection extension

For more information see #297, essentially if there is no projection extension found on an item, then we create Dataset object with "faked" grid, Dataset's .extent is still valid and so data can be loaded from that Dataset, one just can't know what native resolution and projections are. But so long as user supplies desired resolution and projection for loaded data it's not a problem.

If asset has no `.owner` then we can't tell if proj extension is
enabled, so assume it isn't and skip proj check when determining
if band is a data band or not.
Group bands by GSD with an assumption that bands with the same ground
sampling distance share footprint and resolution
cfg parameter is meant to be optional
@codecov
Copy link

codecov bot commented Sep 3, 2021

Codecov Report

Merging #351 (d592b88) into develop (d4a7453) will increase coverage by 0.38%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #351      +/-   ##
===========================================
+ Coverage    57.68%   58.06%   +0.38%     
===========================================
  Files           75       75              
  Lines         6466     6525      +59     
===========================================
+ Hits          3730     3789      +59     
  Misses        2736     2736              
Impacted Files Coverage Δ
libs/stac/odc/stac/__init__.py 100.00% <ø> (ø)
libs/stac/odc/stac/_eo3.py 100.00% <100.00%> (ø)

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 d4a7453...d592b88. Read the comment docs.

@Kirill888 Kirill888 merged commit 1a33fad into develop Sep 6, 2021
@Kirill888 Kirill888 deleted the stac/product-from-collection branch September 6, 2021 02:30
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.

2 participants