easystac.radiant.image_collection.ImageCollection

class easystac.radiant.image_collection.ImageCollection(collection)[source]

ImageCollection object for Radiant Earth ML Hub.

This object mimics the Earth Engine filtering methods for ee.ImageCollection class and makes them available for the Radiant Earth ML Hub STAC.

Parameters

collection (str) – Collection name.

Examples

>>> import easystac.radiant as rd
>>> rd.Authenticate()
>>> rd.Initialize()
>>> S1floods = (rd.ImageCollection("sen12floods_s1_source")
        .filterDate("2019-01-01","2019-01-05")
        .getInfo(epsg = 4326,resolution = 0.0001))

Methods

filterDate(initialDate, finalDate)

Initializes the initial and final date for datetime filtering.

filterBounds(geometry)

Initializes the geometry for bounds filtering.

getInfo(**kwargs)

Returns all the information from the STAC search.

filterDate(initialDate, finalDate)

Initializes the initial and final date for datetime filtering.

Parameters
  • initialDate (str) – Initial date in format %Y-%m-%d.

  • finalDate (str) – Final date in format %Y-%m-%d.

Return type

BaseImageCollection

Examples

>>> import easystac.planetary as pc
>>> pc.Authenticate()
>>> pc.Initialize()
>>> S2 = (pc.ImageCollection("sentinel-2-l2a")
        .filterDate("2020-01-01","2021-01-01"))
filterBounds(geometry)

Initializes the geometry for bounds filtering.

Parameters

geometry (dict) – GeoJSON object of dictionary-like object representing a GeoJSON.

Return type

BaseImageCollection

Examples

>>> import easystac.planetary as pc
>>> from geojson import Point
>>> pc.Authenticate()
>>> pc.Initialize()
>>> geom = Point([-76.1,4.3])
>>> S2 = (pc.ImageCollection("sentinel-2-l2a")
        .filterBounds(geom))
getInfo(**kwargs)[source]

Returns all the information from the STAC search.

Parameters

**kwargs – Additional arguments passed to stackstac.stack(). Some of them are epsg, resolution, and bbox.

Returns

Chunked DataArray with Dask.

Return type

xarray.DataArray

Examples

>>> import easystac.radiant as rd
>>> rd.Authenticate()
>>> rd.Initialize()
>>> S1floods = (rd.ImageCollection("sen12floods_s1_source")
        .filterDate("2019-01-01","2019-01-05")
        .getInfo(epsg = 4326,resolution = 0.0001))