Tooling for converting STAC metadata to ODC data model

Overview

odc.stac

Documentation Status Test Status Test Coverage

Tooling for converting STAC metadata to ODC data model.

Usage

odc.stac.load

catalog = pystac.Client.open(...)
query = catalog.search(...)
xx = odc.stac.load(
    query.get_items(),
    bands=["red", "green", "blue"],
    crs="EPSG:32606",
    resolution=(-100, 100),
)
xx.red.plot.imshow(col="time")

Installation

Using pip

pip install odc-stac

Using Conda

This package is be available on conda-forge channel:

conda install -c conda-forge odc-stac

To use development version of odc-stac install dependencies from conda, then install odc-stac with pip.

Sample environment.yml is provided below.

channels:
  - conda-forge
dependencies:
  - datacube >=1.8.5
  - xarray
  - numpy
  - pandas
  - affine
  - rasterio
  - toolz
  - jinja2
  - pystac
  - pip =20
  - pip:
    - odc-stac
Comments
  • Make `botocore` an optional dependency

    Make `botocore` an optional dependency

    ~Required because odc.stac.configure_s3_access is part of the public API, which imports from _aws which requires botocore.~

    Adds botocore as an optional dependency. Includes:

    • Nicer import error message when botocore is not installed
    • Skip aws tests when botocore is not installed
    • CI with/without botocore
    • README instructions on using extra_requires with pip
    opened by gadomski 21
  • AssertionError: Only axis-aligned geoboxes are currently supported

    AssertionError: Only axis-aligned geoboxes are currently supported

    I'm relatively new to odc-stac and Digital Earth Africa, and trying out the stac client and odc-stac package to access sentinel-1. I started with the digital earth africa sentinel2 example code and that worked fine, but when I tried adapting it for sentinel-1, I'm getting AssertionError: Only axis-aligned geoboxes are currently supported, despite trying both projected and lon/lat specification.

    I'm guessing this is user error rather than a bug, so suggestions welcome! :)

    opened by rsignell-usgs 13
  • incorrect xarray size when downsampling?

    incorrect xarray size when downsampling?

    Hi there. Thanks a lot for this awesome tool!

    I am working with some Sentinel-2 data which I am downsampling for testing purposes.

    I wonder whether the following behaviour is expected...

    Let's get some STAC items (with a reproducible example from here):

    import pystac_client
    import planetary_computer
    
    catalog = pystac_client.Client.open(
        "https://planetarycomputer.microsoft.com/api/stac/v1",
        modifier=planetary_computer.sign_inplace,
    )
    
    time_range = "2020-12-01/2020-12-31"
    bbox = [-122.2751, 47.5469, -121.9613, 47.7458]
    
    search = catalog.search(collections=["landsat-c2-l2"], bbox=bbox, datetime=time_range)
    items = search.get_all_items()
    

    ...get the size of one band at full resolution:

    out = odc_stac.load(
        items,
        bands=['blue'],
        chunks={'x': 256, 'y': 256}
    )
    x = out.sizes['x']
    y = out.sizes['y']
    res = items[0].to_dict()['assets']['blue']['raster:bands'][0]['spatial_resolution']
    

    ..and then load the same band with different resolutions:

    for factor in [2, 3, 4]:
        print('factor:', factor)
        out = odc_stac.load(
            items,
            bands=['blue'],
            resolution=res * factor,
            chunks={'x': 256, 'y': 256}
        )
        print(f'expected size: {y // factor} x {x // 2}')
        print(f'actual size:   {out.sizes["y"]} x {out.sizes["x"]}')
        print('-' * 30)
    

    This gives me:

    factor: 2
    expected size: 3986 x 6186
    actual size:   3987 x 6187
    ------------------------------
    factor: 3
    expected size: 2657 x 6186
    actual size:   2658 x 4125
    ------------------------------
    factor: 4
    expected size: 1993 x 6186
    actual size:   1994 x 3094
    ------------------------------
    
    opened by johntruckenbrodt 11
  • Requester pays environment variable for assets on S3

    Requester pays environment variable for assets on S3

    Although it is possible to use odc.stac.load to load items whose assets are in requester-pays S3 buckets (e.g. landsat-c2l2-sr), the documentation is not entirely clear on how to accomplish this. Setting the environment variable AWS_REQUEST_PAYER to requester does the trick, but I was unable to use odc.stac.configure_rio(aws={"requester_pays": True}) to load the data. I'm happy to make a docs PR here to address this topic, unless there is a more native way of going about this.

    opened by arthurelmes 9
  • Add BenchmarkContext dataclass and benchmark data loading helpers

    Add BenchmarkContext dataclass and benchmark data loading helpers

    Captures important context about benchmarking tasks and provides some reporting facilities for that data.

    I have added docs for odc.stac.bench.* too, but there are some issues with dataclasss and auto-type-hints in sphinx. Would be nice to figure out how to turn off documentation for autogenerated __init__ method.

    opened by Kirill888 9
  • Notebook examples, use less of odc.ui things

    Notebook examples, use less of odc.ui things

    Testing how well new way of updating notebooks works.

    There should be a netlify link posted that allows to review documentation changes before they make it to read the docs.

    Notebook changes

    Significant improvements in "load data from AWS Sentinel2 collection".

    • Don't sure odc.ui.show_datasets instead construct ipyleaflet.Map manually
    • Plot STAC footprints and query rectangle
    • Demonstrate how to load smaller region
    • Fix CSS problems when displaying xarray widget state

    To review changes see here: https://618a4f6414a45b24dd03d7fb--odc-stac-docs.netlify.app/notebooks/stac-load-e84-aws.html

    opened by Kirill888 9
  • Tweak README a bit (#38)

    Tweak README a bit (#38)

    • add links to documentation and sample notebooks
    • remove crs/resolution parameters from sample
    • Update sample notebook for planetary computer, removed no longer needed installation instructions

    Closes #38

    opened by Kirill888 7
  • `math domain error` for some Planetary Computer GOES-CMI assets

    `math domain error` for some Planetary Computer GOES-CMI assets

    This throws a ValueError when trying to build a Dataset from a GOES-CMI STAC item from the Planetary Computer:

    import pystac
    import planetary_computer
    import odc.stac
    
    
    item = planetary_computer.sign(
        pystac.Item.from_file("https://planetarycomputer.microsoft.com/api/stac/v1/collections/goes-cmi/items/OR_ABI-L2-C-M6_G16_s20200012356184")
    )
    
    # Drop assets in different projections
    # https://github.com/opendatacube/odc-stac/issues/70
    bands = {"C01_2km", "C02_2km", "C03_2km"}
    item.assets = {k: v for k, v in item.assets.items() if k in bands}
    
    ds = odc.stac.stac_load([item], bands=bands, chunks={})
    

    The error is

    ---------------------------------------------------------------------------
    ValueError                                Traceback (most recent call last)
    Input In [7], in <cell line: 15>()
         12 bands = {"C01_2km", "C02_2km", "C03_2km"}
         13 item.assets = {k: v for k, v in item.assets.items() if k in bands}
    ---> 15 ds = odc.stac.stac_load([item], bands=bands, chunks={})
    
    File /srv/conda/envs/notebook/lib/python3.8/site-packages/odc/stac/_load.py:460, in load(items, bands, groupby, resampling, dtype, chunks, pool, crs, resolution, align, geobox, bbox, lon, lat, x, y, like, geopolygon, progress, stac_cfg, patch_url, preserve_original_order, **kw)
        457 items = list(items)
        458 _parsed = list(parse_items(items, cfg=stac_cfg))
    --> 460 gbox = output_geobox(
        461     _parsed,
        462     bands=bands,
        463     crs=crs,
        464     resolution=resolution,
        465     align=align,
        466     geobox=geobox,
        467     like=like,
        468     geopolygon=geopolygon,
        469     bbox=bbox,
        470     lon=lon,
        471     lat=lat,
        472     x=x,
        473     y=y,
        474 )
        476 if gbox is None:
        477     raise ValueError("Failed to auto-guess CRS/resolution.")
    
    File /srv/conda/envs/notebook/lib/python3.8/site-packages/odc/stac/_mdtools.py:805, in output_geobox(items, bands, crs, resolution, align, geobox, like, geopolygon, bbox, lon, lat, x, y)
        803 x0, y0, x1, y1 = _compute_bbox(items, crs)
        804 geopolygon = geom.box(x0, y0, x1, y1, crs)
    --> 805 return GeoBox.from_geopolygon(geopolygon, resolution=resolution, align=align)
    
    File /srv/conda/envs/notebook/lib/python3.8/site-packages/odc/geo/geobox.py:227, in GeoBox.from_geopolygon(geopolygon, resolution, crs, align, shape, tight, anchor, tol)
        224 else:
        225     geopolygon = geopolygon.to_crs(crs)
    --> 227 return GeoBox.from_bbox(
        228     geopolygon.boundingbox,
        229     crs,
        230     shape=shape,
        231     resolution=resolution,
        232     anchor=anchor,
        233     tol=tol,
        234     tight=tight,
        235 )
    
    File /srv/conda/envs/notebook/lib/python3.8/site-packages/odc/geo/geobox.py:151, in GeoBox.from_bbox(bbox, crs, tight, shape, resolution, anchor, tol)
        149     offy, ny = snap_grid(bbox.bottom, bbox.top, ry, None, tol=tol)
        150 else:
    --> 151     offx, nx = snap_grid(bbox.left, bbox.right, rx, _snap.x, tol=tol)
        152     offy, ny = snap_grid(bbox.bottom, bbox.top, ry, _snap.y, tol=tol)
        154 affine = Affine.translation(offx, offy) * Affine.scale(rx, ry)
    
    File /srv/conda/envs/notebook/lib/python3.8/site-packages/odc/geo/math.py:172, in snap_grid(x0, x1, res, off_pix, tol)
        169     return x1, max(nx, 1)
        171 off = off_pix * abs(res)
    --> 172 _tx, nx = _snap_edge(x0 - off, x1 - off, res, tol)
        173 return _tx + off, nx
    
    File /srv/conda/envs/notebook/lib/python3.8/site-packages/odc/geo/math.py:140, in _snap_edge(x0, x1, res, tol)
        138 assert x1 >= x0
        139 if res > 0:
    --> 140     return _snap_edge_pos(x0, x1, res, tol)
        141 _tx, nx = _snap_edge_pos(x0, x1, -res, tol)
        142 tx = _tx + nx * (-res)
    
    File /srv/conda/envs/notebook/lib/python3.8/site-packages/odc/geo/math.py:132, in _snap_edge_pos(x0, x1, res, tol)
        130 assert x1 >= x0
        131 _x0 = floor(maybe_int(x0 / res, tol))
    --> 132 _x1 = ceil(maybe_int(x1 / res, tol))
        133 nx = max(1, _x1 - _x0)
        134 return _x0 * res, nx
    
    File /srv/conda/envs/notebook/lib/python3.8/site-packages/odc/geo/math.py:57, in maybe_int(x, tol)
         50 def maybe_int(x: float, tol: float) -> Union[int, float]:
         51     """
         52     Turn almost ints to actual ints.
         53 
         54     pass through other values unmodified.
         55     """
    ---> 57     x_whole, x_part = split_float(x)
         59     if abs(x_part) < tol:  # almost int
         60         return int(x_whole)
    
    File /srv/conda/envs/notebook/lib/python3.8/site-packages/odc/geo/math.py:39, in split_float(x)
         28 def split_float(x: float) -> Tuple[float, float]:
         29     """
         30     Split float number into whole and fractional parts.
         31 
       (...)
         37     :return: ``whole, fraction``
         38     """
    ---> 39     x_part = fmod(x, 1.0)
         40     x_whole = x - x_part
         41     if x_part > 0.5:
    
    ValueError: math domain error
    

    I haven't dug too deeply yet, but x there at the end, which I think is something like bbox.right is inf.

    https://planetarycomputer.microsoft.com/api/stac/v1/collections/goes-cmi/items/OR_ABI-L2-C-M6_G16_s20200012356184 is a link to the STAC metadata.

    opened by TomAugspurger 6
  • Starting to add some tests for internal reader

    Starting to add some tests for internal reader

    probably a bunch of things in odc.stac.testing.{_xr,_cog} should be generalized and moved to odc-geo and made available when rasterio and xarray are installed.

    _cog.py is basically copy from datacube with dask parts removed, new things are write_cog_layers which allows arbitrary overviews to be written, this will be useful when testing read from overviews properly, so far that was only tested in the notebook.

    also includes a fix for #46

    opened by Kirill888 6
  • Identify corrupt data source in odc.stac.load

    Identify corrupt data source in odc.stac.load

    Hi all, first of all thanks for this great tool!

    I'm currently trying to aggregate raster values of a xarray.DataSet created with odc-stac based on several hundred STAC items, similar to this reproducible example:

    import pystac_client
    import planetary_computer
    from odc.stac import load
    
    catalog = pystac_client.Client.open(
        "https://planetarycomputer.microsoft.com/api/stac/v1", 
        modifier=planetary_computer.sign_inplace
    ) 
    
    time_range = "2020-01-01/2020-12-31"
    bbox = [-122.2751, 47.5469, -121.9613, 47.7458]
    
    search = catalog.search(collections=["landsat-c2-l2"], bbox=bbox, datetime=time_range)
    items = search.get_all_items()
    
    data = load(items, bands=["green"], chunks={"x": 256, "y": 256})
    res = data.sum(dim="time").compute()
    

    If, however, one of the many items is corrupt, it is very hard to indentify the faulty data source just from the RasterioIOError that gets returned:

    # lets break a random href of an Landsat item
    items[0].assets['green'].href = "https://faulty_url"
    

    Excecuting the code above returns:

    Exception has occurred: RasterioIOError
    HTTP response code: 404
    
    During handling of the above exception, another exception occurred:
    
      File "/path/to/file", line 16, in <module>
        res = data.sum(dim="time").compute()
    

    Is there an option to extend the logging in odc.stac.load in order to identify which Item/Asset rasterio wasn't able to open?

    opened by SandroGroth 5
  • Use asset keys as canonical band names

    Use asset keys as canonical band names

    Overview

    This PR fixes how odc-stac uses the Electro-Optical STAC extension to generate band aliases. Specifically:

    • Asset keys are used as the canonical name for bands, instead of eo:bands -> name
    • eo:bands -> common_name and eo:bands -> name are both used as aliases back to asset keys

    This enables support for the common STAC pattern of "one band per asset".

    Background

    Initially raised in https://github.com/Element84/geo-notebooks/issues/8. USGS has changed the structure of their STAC items such that eo:band -> name does not match the asset key (example item here). Instead, eo:band -> common_name is the asset key.

    More generally, odc-stac was incorrectly reading eo:bands information from the Item instead of from the Assets. From the EO extension:

    Each Asset should specify its own band object. If the individual bands are repeated in different assets they should all use the same values and include the optional name field to enable clients to easily combine and summarize the bands.

    The eo:bands array may optionally be used in the Item Properties to summarize the available bands in the assets. This should be a 'union' of all the possible bands represented in assets. It should be considered merely informative - clients should rely on the eo:bands of each asset.

    This PR fixes odc-stac to read band information from each asset.

    Details

    • If name or common_name matches the asset key, it is not added to the aliases.
    • Multi-band assets are not supported via the alias mechanism. It's not clear if this was ever correctly supported previously, but now it is explicitly unsupported with a warning.
    • Test case included with a new Landsat item demonstrating its layout.
    • Since this does not change the public API, IMO this could be incorporated in a MINOR release, e.g. v0.3.1.
    opened by gadomski 5
  • Feature: report IO failures in a pogrammatic fashion

    Feature: report IO failures in a pogrammatic fashion

    This is related to #99 and #97.

    Now that "continue in the face of errors" feature is implemented see (#99). When IO errors happen they are logged and forgotten, however that means there is no easy way of knowing

    1. Whether any failures have happened
    2. Which inputs were corrupt

    Quote from issue #99

    For local load case errors can be reported via an attribute, something like xx.load_failures, or via thread-local global variable that reports failures for the last load that happened: odc.stac.load_failures(). With Dask, computation is delayed and distributed, so certainly can not be done as an attribute. In case of Dask we could maintain a global dictionary mapping load-task-id -> [Failure], so would be something like odc.stac.load_failures(xx) that would lookup failures that might have happened when processing xx, complexity with this approach is mainly to do with cache life-cycle management: when and how to purge failures that happened in the past.

    Basically having an interface for error reporting that works "the same" for Dask and local load case can be tricky. Maybe we could instead have two different interfaces, one for local load and a separate one for Dask. We can start with local only, as this one will be used by Dask implementation anyway.

    opened by Kirill888 0
  • Task: add documentation for pixel grids

    Task: add documentation for pixel grids

    Problem Description

    odc.stac.load output pixel grid can be confusing to users. Unexpected result often look like an error in implementation: an extra pixel column/row, but in fact it is an expected feature of the loading process and has to do with "pixel grid snapping". There is a common expectation that output will start exactly at min(x) of the input data. This is not always the case. Most commonly this manifests when loading data at reduced resolution, example #94.

    Another source of confusion is to do with coordinates of the returned xarray. Coordinates are for pixel centers, not for the edge. Common mistake is to assume that image spans [img.x[0], img.x[-1]]. It does not.

    • [img.x[0], img.x[-1]], pixel centers are not pixel edges
    • [img.x[0]-res/2, img.x[-1]+res/2], better but need to know pixel size
    • ✅✅ img.odc.geobox.boundingbox.range_x, best

    Worth noting that users of stackstac experience similar confusion, and there is a pinned issue https://github.com/gjoseph92/stackstac/issues/152 helping users.

    Pixel Grid Snapping

    Just because two images have the same resolution, the same projection and overlap, does not mean that individual pixels overlap exactly with each other:

    image

    When requested to load two images above how the output pixel grid should look like? Should we pick pixel grid that aligns with orange or with blue image, or something else? We choose something else.

    Say images above have pixel size of 100 units, orange one starts at X=130 and blue one at X=690. Image that will be produced in this case will default to starting at X=100 and so both images will be resampled into that common grid. We pick X=100 because this aligns pixel edges to integer multiples of pixel size.

    A common assumption users have, is that instead, output image should start at X=130 as this is the left edge of available input data. It's a sensible assumption. Image like that can be produced by odc.stac, but requires specifying anchor= parameter, value of odc.geo.geobox.AnchorEnum.FLOATING, this turns off pixel snapping. This is not well reflected in the docs. Maybe worth adding snap=False or tight=True argument as a more obvious alias for that behaviour.

    The advantage of snapping becomes apparent when combining data from different sources: just use the same resolution to load data from different sources and resulting images are guaranteed to have exactly overlapping pixels, so you can combine those arrays without needing further resampling.

    References

    • https://github.com/opendatacube/odc-geo/issues/59
    • https://odc-stac.readthedocs.io/en/latest/_api/odc.stac.load.html?highlight=anchor
    • https://odc-geo.readthedocs.io/en/latest/intro-geobox.html
    • https://odc-geo.readthedocs.io/en/latest/_api/odc.geo.geobox.GeoBox.from_bbox.html
    • #94
    • https://github.com/gjoseph92/stackstac/issues/152
    opened by Kirill888 0
  • Control chunking of non-spatial dimensions

    Control chunking of non-spatial dimensions

    Hi all, as far as I can see it is currently not possible to control the chunking of non-spatial dimensions when loading a dataset, right? So in order to have chunks that, for example, extend through the time dimension, I'd need an extra step like this:

    ds = odc.stac.load(items=items, bands=bands, chunks={'x': 2048, 'y': 2048})
    ds = ds.chunk(chunks={'time':-1})
    

    I've used ODC in the past and expected chunks={'x': 2048, 'y': 2048, 'time':-1} to work. If this is only going to be added sometime in the future, I think there should be a note in the documentation that currently only chunking of spatial dimensions is supported.

    opened by maawoo 3
  • Deprecate `odc.stac.stac_load`

    Deprecate `odc.stac.stac_load`

    odc.stac.stac_load is an alias of odc.stac.load: https://github.com/opendatacube/odc-stac/blob/064c5f04573f8a873ae52ab76d047510ed033caf/odc/stac/init.py#L13. IMO one should be deprecated in favor of the other, and odc.stac.load feels like a better name to me.

    opened by gadomski 0
  • Support local paths

    Support local paths

    odc-stac should accept STAC items that have local paths. The underlying error comes from datacube, so maybe the fix should go there? If so we can transfer this issue over.

    Example script

    This script uses a MODIS file from the Planetary Computer (staging), but any tif will do. Requires stactools.

    import datetime
    import odc.stac
    import stactools.core.create
    
    bbox = [-107, 39, -106, 40]
    file_name = "MYD10A1.A2020335.h10v04.061.2020357064115_NDSI_Snow_Cover.tif"
    item = stactools.core.create.item(file_name)  # asset href is set to "MYD10A1.A2020335.h10v04.061.2020357064115_NDSI_Snow_Cover.tif"
    item.common_metadata.start_datetime = datetime.datetime(2020, 11, 30)
    item.common_metadata.end_datetime = datetime.datetime(2020, 11, 30, 23, 59, 59)
    xarray = odc.stac.load([item], bands="data", resolution=500, bbox=bbox)
    

    Expected behavior

    It works

    Actual behavior

    Traceback (most recent call last):
      File "/Users/gadomski/Code/odc-stac/scripts/local_path.py", line 10, in <module>
        xarray = odc.stac.load([item], bands="data", resolution=500, bbox=bbox)
      File "/Users/gadomski/Code/odc-stac/odc/stac/_load.py", line 462, in load
        return dc_load(
      File "/Users/gadomski/Code/odc-stac/odc/stac/_dcload.py", line 191, in dc_load
        return Datacube.load_data(
      File "/Users/gadomski/.virtualenvs/odc-stac/lib/python3.9/site-packages/datacube/api/core.py", line 768, in load_data
        return Datacube._xr_load(sources, geobox, measurements,
      File "/Users/gadomski/.virtualenvs/odc-stac/lib/python3.9/site-packages/datacube/api/core.py", line 701, in _xr_load
        _fuse_measurement(data_slice, datasets, geobox, m,
      File "/Users/gadomski/.virtualenvs/odc-stac/lib/python3.9/site-packages/datacube/api/core.py", line 902, in _fuse_measurement
        src = new_datasource(BandInfo(ds, measurement.name, extra_dim_index=extra_dim_index))
      File "/Users/gadomski/.virtualenvs/odc-stac/lib/python3.9/site-packages/datacube/drivers/readers.py", line 110, in new_datasource
        return source_type(band)
      File "/Users/gadomski/.virtualenvs/odc-stac/lib/python3.9/site-packages/datacube/storage/_rio.py", line 223, in __init__
        filename = _url2rasterio(band.uri, band.format, band.layer)
      File "/Users/gadomski/.virtualenvs/odc-stac/lib/python3.9/site-packages/datacube/storage/_rio.py", line 297, in _url2rasterio
        raise ValueError("Expect either URL or /vsi path")
    ValueError: Expect either URL or /vsi path
    
    bug 
    opened by gadomski 23
  • Scale/offset with `raster:bands.{scale|offset}`

    Scale/offset with `raster:bands.{scale|offset}`

    The raster extension provides scale and offset information. These scales and offsets should be applied to loaded data, if available. Right now, we're having to work around it like this:

    data = odc.stac.load(
        items,
        crs="EPSG:3857",
        bands="500m_16_days_NDVI",
        resolution=500,
        bbox=bbox,
    )
    raster = RasterExtension.ext(items[0].assets["500m_16_days_NDVI"])
    data = data["500m_16_days_NDVI"] * raster.bands[0].scale
    

    Full notebook example that includes the workaround in Cell 4 here.

    enhancement 
    opened by gadomski 5
Releases(v0.3.4)
  • v0.3.4(Dec 8, 2022)

    What's Changed

    • Add "continue on error" feature to odc.stac.load by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/100
    • Github actions maintenance
    • Minor corrections to docs

    Full Changelog: https://github.com/opendatacube/odc-stac/compare/v0.3.3...v0.3.4

    Source code(tar.gz)
    Source code(zip)
  • v0.3.3(Oct 20, 2022)

    What's Changed

    • Fixes for xarray==2020.10.0, see #90 and #91

    Full Changelog: https://github.com/opendatacube/odc-stac/compare/v0.3.2...v0.3.3

    Source code(tar.gz)
    Source code(zip)
  • v0.3.2(Sep 9, 2022)

    What's Changed

    STAC Metadata Processing Changes

    • Reworking metadata extraction from pystac in https://github.com/opendatacube/odc-stac/pull/80, https://github.com/opendatacube/odc-stac/pull/86

    Removes various limitations that were present previously

    • Can handle multi-band assets (can use asset_name.2 or common name to access those)
    • Better handling of clashing common names (aka aliases)
    • Handling of collections with irregular assets. No longer assume that first observed STAC item has all the possible assets/bands and instead build up collection description incrementally from observed items
    • Handle STAC items that use older raster extension than version supported by currently installed pystac library

    Support GCP data sources

    Can read data from imagery using GCPs for registration. Starting from odc-geo>=0.3.0there is GCPGeoBox that offers same kind of functionality allowing for re-using the same data loading logic for both "transform" and "GCP" based data sources. On the output side only "transform"-based geoboxes are supported.

    Other

    • More robust handling of STAC items with geometries that do not project cleanly into epsg:4326 (https://github.com/opendatacube/odc-stac/issues/85)
    • Make botocore an optional dependency by @gadomski in https://github.com/opendatacube/odc-stac/pull/76
    • Fix GDAL/rasterio configuration capture and transfer to processing threads https://github.com/opendatacube/odc-stac/issues/82

    Full Changelog: https://github.com/opendatacube/odc-stac/compare/v0.3.1...v0.3.2

    Source code(tar.gz)
    Source code(zip)
  • v0.3.1(Jun 27, 2022)

    What's Changed

    • Use asset keys as canonical band names by @gadomski in https://github.com/opendatacube/odc-stac/pull/77

    Full Changelog: https://github.com/opendatacube/odc-stac/compare/v0.3.0...v0.3.1

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Jun 7, 2022)

    Major Changes from v0.2.4

    • No longer depend on datacube library
      • Significantly smaller set of compulsory dependencies, easier to install/deploy
    • Using odc-geo library instead of datacube for GeoBox and Geometry classes
    • Can load data into rotated pixel planes (Example)
    • Arbitrary grouping of STAC items into pixel planes with user supplied grouping methods or group by property name
    • Better handling of credentials and other GDAL state in distributed context
      • credentials and GDAL environment configuration were part of the global state previously, now global state is removed, so you can access collections with different permissions from the same Dask cluster (for example mixing public and private access).
    • Parallelized data loading even when not using Dask
    • Progress reporting for non-Dask load with tqdm

    See demo notebook highlighting some of the new features of odc-stac and features enabled by transition to odc-geo.

    What's Changed

    Auto-generated changes follow here

    • New example showing how to load DE Africa data by @caitlinadams in https://github.com/opendatacube/odc-stac/pull/32
    • Fix build by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/33
    • Change band name from SLC to SCL by @caitlinadams in https://github.com/opendatacube/odc-stac/pull/35
    • Fixed one remaining instance of SLC by @caitlinadams in https://github.com/opendatacube/odc-stac/pull/36
    • Tweak README a bit (#38) by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/39
    • Tweak docs in stac.load by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/41
    • Starting migration away from datacube dependency by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/42
    • De-duplicate code in _eo3converter by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/43
    • Adding output geobox computation by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/44
    • Low level reader functionality by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/45
    • Starting to add some tests for internal reader by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/51
    • Set floor for stackstac version by @gadomski in https://github.com/opendatacube/odc-stac/pull/53
    • Starting new stac.load version by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/57
    • Implement temporal grouping and populate time axis by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/58
    • Implementing load with pixel fusing by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/60
    • Implement per band resampling and dtype config by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/61
    • Implement Dask version of load by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/62
    • Add back configure_rio and configure_s3_access by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/63
    • Merge develop changes to next by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/64
    • Fix packaging and bump version to 0.3.0a1 by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/65
    • Update sample notebooks and binder environment by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/66
    • Next version: no datacube dependency by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/67
    • Release candidate (0.3.0rc0) by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/68
    • Progress reporting and multi-threaded load by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/69
    • Fix issue #70, release 0.3.0rc2 by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/71
    • Generalize groupby by @Kirill888 in https://github.com/opendatacube/odc-stac/pull/72

    New Contributors

    • @caitlinadams made their first contribution in https://github.com/opendatacube/odc-stac/pull/32

    Full Changelog: https://github.com/opendatacube/odc-stac/compare/v0.2.4...v0.3.0

    Source code(tar.gz)
    Source code(zip)
  • v0.2.4(Jan 19, 2022)

  • v0.2.3(Jan 5, 2022)

    Added

    • This CHANGELOG
    • requirements-dev.txt
    • Documentation
    • Upload built conda environment as an artifact
    • Notebook rendering to Github actions, including hash-based artifact checks
    • Initial benchmarking tooling, still in progress

    Changed

    • Moved publishing steps into separate workflows
    • Deprecated imports from odc.index.*
    • Removed .units attribute from .time axis for better inter-op with .to_zarr, .to_netcdf

    Fixed

    • Handling of STAC Items with only partial proj data
    • Typos in documentation
    Source code(tar.gz)
    Source code(zip)
  • v0.2.2(Oct 25, 2021)

  • v0.2.1(Oct 19, 2021)

  • v0.2.0a9(Oct 12, 2021)

Owner
Open Data Cube
Open Data Cube
bespoke tooling for offensive security's Windows Usermode Exploit Dev course (OSED)

osed-scripts bespoke tooling for offensive security's Windows Usermode Exploit Dev course (OSED) Table of Contents Standalone Scripts egghunter.py fin

epi 268 Jan 5, 2023
Tooling for the Common Objects In 3D dataset.

CO3D: Common Objects In 3D This repository contains a set of tools for working with the Common Objects in 3D (CO3D) dataset. Download the dataset The

Facebook Research 724 Jan 6, 2023
Tooling for GANs in TensorFlow

TensorFlow-GAN (TF-GAN) TF-GAN is a lightweight library for training and evaluating Generative Adversarial Networks (GANs). Can be installed with pip

null 803 Dec 24, 2022
A set of tools for converting a darknet dataset to COCO format working with YOLOX

darknet格式数据→COCO darknet训练数据目录结构(详情参见dataset/darknet): darknet ├── class.names ├── gen_config.data ├── gen_train.txt ├── gen_valid.txt └── images

RapidAI-NG 148 Jan 3, 2023
Converting CPT to bert form for use

cpt-encoder 将CPT转成bert形式使用 说明 刚刚刷到又出了一种模型:CPT,看论文显示,在很多中文任务上性能比mac bert还好,就迫不及待想把它用起来。 根据对源码的研究,发现该模型在做nlu建模时主要用的encoder部分,也就是bert,因此我将这部分权重转为bert权重类型

黄辉 1 Oct 14, 2021
Experiments and examples converting Transformers to ONNX

Experiments and examples converting Transformers to ONNX This repository containes experiments and examples on converting different Transformers to ON

Philipp Schmid 4 Dec 24, 2022
Optimizes image files by converting them to webp while also updating all references.

About Optimizes images by (re-)saving them as webp. For every file it replaced it automatically updates all references. Works on single files as well

Watermelon Wolverine 18 Dec 23, 2022
Library for converting from RGB / GrayScale image to base64 and back.

Library for converting RGB / Grayscale numpy images from to base64 and back. Installation pip install -U image_to_base_64 Conversion RGB to base 64 b

Vladimir Iglovikov 16 Aug 28, 2022
Code I use to automatically update my videos' metadata on YouTube

mCodingYouTube This repository contains the code I use to automatically update my videos' metadata on YouTube, including: titles, descriptions, tags,

James Murphy 19 Oct 7, 2022
Hierarchical Metadata-Aware Document Categorization under Weak Supervision (WSDM'21)

Hierarchical Metadata-Aware Document Categorization under Weak Supervision This project provides a weakly supervised framework for hierarchical metada

Yu Zhang 53 Sep 17, 2022
Bib-parser - Convenient script to parse .bib files with the ACM Digital Library like metadata

Bib Parser Convenient script to parse .bib files with the ACM Digital Library li

Mehtab Iqbal (Shahan) 1 Jan 26, 2022
Google-drive-to-sqlite - Create a SQLite database containing metadata from Google Drive

google-drive-to-sqlite Create a SQLite database containing metadata from Google

Simon Willison 140 Dec 4, 2022
In this project we investigate the performance of the SetCon model on realistic video footage. Therefore, we implemented the model in PyTorch and tested the model on two example videos.

Contrastive Learning of Object Representations Supervisor: Prof. Dr. Gemma Roig Institutions: Goethe University CVAI - Computational Vision & Artifici

Dirk Neuhäuser 6 Dec 8, 2022
Step by Step on how to create an vision recognition model using LOBE.ai, export the model and run the model in an Azure Function

Step by Step on how to create an vision recognition model using LOBE.ai, export the model and run the model in an Azure Function

El Bruno 3 Mar 30, 2022
A complete end-to-end demonstration in which we collect training data in Unity and use that data to train a deep neural network to predict the pose of a cube. This model is then deployed in a simulated robotic pick-and-place task.

Object Pose Estimation Demo This tutorial will go through the steps necessary to perform pose estimation with a UR3 robotic arm in Unity. You’ll gain

Unity Technologies 187 Dec 24, 2022
[IJCAI-2021] A benchmark of data-free knowledge distillation from paper "Contrastive Model Inversion for Data-Free Knowledge Distillation"

DataFree A benchmark of data-free knowledge distillation from paper "Contrastive Model Inversion for Data-Free Knowledge Distillation" Authors: Gongfa

ZJU-VIPA 47 Jan 9, 2023
Model search is a framework that implements AutoML algorithms for model architecture search at scale

Model search (MS) is a framework that implements AutoML algorithms for model architecture search at scale. It aims to help researchers speed up their exploration process for finding the right model architecture for their classification problems (i.e., DNNs with different types of layers).

Google 3.2k Dec 31, 2022
Capture all information throughout your model's development in a reproducible way and tie results directly to the model code!

Rubicon Purpose Rubicon is a data science tool that captures and stores model training and execution information, like parameters and outcomes, in a r

Capital One 97 Jan 3, 2023
Implementation of STAM (Space Time Attention Model), a pure and simple attention model that reaches SOTA for video classification

STAM - Pytorch Implementation of STAM (Space Time Attention Model), yet another pure and simple SOTA attention model that bests all previous models in

Phil Wang 109 Dec 28, 2022