Introducing Intake-stac

Joe Hamman
Mar 3, 2020 · 3 min read
logos
logos

We’re excited to introduce a new Intake driver: Intake-stac. We think this tool will make it much easier to explore SpatioTemporal Asset Catalogs (STAC) and enable interactive data analysis and visualization in a Python environment.

Intake-stac provides Intake drivers that support opening STAC Catalogs, Collections, Items and ItemCollections. By combining Intake and sat-stac, Intake-stac provides a simple toolkit for working with STAC catalogs and for loading STAC assets as Xarray objects. Intake-stac can be installed via pip or conda-forge:

$ pip install intake-stac
# or
$ conda install -c conda-forge intake-stac

STAC

The STAC specification provides a common, machine-readable (JSON) format for describing a wide range of geospatial datasets. STAC’s goal is to make it easier to index and discover geospatial assets. An asset is any geospatial dataset that can be described by a spatial extent and time. The STAC project is in a state of rapid development; approaching its 1.0 release and quickly finding adoption across the cloud-native geospatial imagery community. More on STAC, its specification, and its ecosystem of tools on the STAC website or in this introductory blogpost from Chris Holmes:

Using Intake-stac

While STAC provides a powerful and flexible standard for describing data, it doesn’t do much to load assets into memory for custom computations and analysis. That’s where Intake-stac comes in, providing a lightweight Intake driver that makes it easy to load data described in STAC catalogs. It does this by integrating functionality included in a number of familiar open source software tools such as Intake, rasterio, Xarray, and sat-stac. Although we highlight some of the functionality included in Intake-stac below, we recommend checking out the documentation site or this Binder for an interactive Jupyter notebook for more details.

binder
binder
Click to launch Intake-stac’s binder demo.

In the example below, we use Intake-stac to open the “planet-disaster-data” STAC catalog:

Now we have an Intake Catalog where we can easily select a specific asset and load it as a Xarray Dataset.

thumbnail
thumbnail
Thumbnail plotted above as `tiff_da.plot()`.

Intake-stac also works well with the sat-search library, providing a powerful tool for dynamically searching, discovering, and loading data all in one place. Here we use sat-search to quickly identify all the Tier 1 Landat scenes within a bounding box before selecting one scene and loading it as an Xarray object.

Next steps and conclusions

We’re excited by what we can now do with STAC and Intake together. In the next phase of the project, we’re looking for feedback on a few things:

Thanks for reading and for trying out Intake-stac. Be in touch!

Building Intake-stac was a team effort. I want to specifically thank Matthew Hanson (Element84), Anderson Banihirwe (NCAR), Julia Signell (Anaconda, now SaturnCloud), Jonah Joughin (UW), and Scott Henderson (UW). The development of Intake-stac was supported in part by NASA-ACCESS grant #80NSSC18M0156.

pangeo

A community platform for big data geoscience

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store