Skip to main content

STAC Collection Search helper utility

Project description

STAC Collection Search

Quick utility which enables you to search for STAC collections with a given bbox and datetime extent.

How to use

  import requests
  import datetime
  import shapely
  from stac_collection_search import search_collections

  url ="https://planetarycomputer.microsoft.com/api/stac/v1/collections"
  headers = {
    "Content-Type": "application/geo+json",
  }
  response = requests.get(url, headers=headers)
  collection_list_json_dict = response.json()
  temporal_extent_start = datetime.datetime(2019, 1, 1)
  temporal_extent_end = datetime.datetime(2021, 1, 1)
  spatial_extent = shapely.geometry.box(50, 0, 51, 1)
  collection_list = search_collections(collection_list_json_dict, spatial_extent=spatial_extent,
                                      temporal_extent_start=temporal_extent_start,
                                      temporal_extent_end=temporal_extent_end)
  print(collection_list, len(collection_list)) """ -> ['3dep-seamless', 'sentinel-1-rtc', '...'], 66 """

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stac_collection_search-0.1.1.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

stac_collection_search-0.1.1-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page