Logo
Home API Guides Status Support Client Release:   
Logo

Getting Started

  • Installation
  • Authentication
  • Configuration
  • Environments
  • Settings
  • Managing a Development Environment
  • Introductory Example
  • Examples
  • Guides

Learn

  • Geospatial 101
  • Remote Sensing 101

Reference

  • API
    • Object-Oriented Clients (recommended)
    • REST Clients
    • Authentication and Configuration
    • Exceptions
    • Geo
    • Utilities
    • Deprecated Clients
      • Scenes
        • Collection
        • Display
        • GeoContext
        • Scene
        • SceneCollection
        • Search
      • Vectors
      • Catalog
      • Metadata
      • Vector
      • Places

User Interfaces

  • Workbench
  • Viewer
  • Catalog
  • Task Monitor

Index

  • Index
  • Module Index

Release Version

menu Descartes Labs
  • Docs »
  • API »
  • Scenes »
  • Search

Search¶

Back to Scenes

get_band(band_id)[source]¶

Get information about a single band.

Parameters:band_id (str) – A band identifier.
Returns:A dictionary of metadata for the band
Return type:DotDict
Raises:NotFoundError – Raised if a band id cannot be found.
get_derived_band(derived_band_id)[source]¶

Get information about a single derived band.

Parameters:
  • derived_band_id (str) – Derived band identifier.
  • metadata_client (Metadata, optional) – Unneeded in general use; lets you use a specific client instance with non-default auth and parameters.
Returns:

A dictionary with metadata for a single derived band.

Return type:

DotDict

Raises:

NotFoundError – Raised if a band id cannot be found.

get_product(product_id)[source]¶

Retrieve information about a single product.

Parameters:product_id (str) – Product Identifier.
Returns:A dictionary with metadata for a single product.
Return type:DotDict
Raises:NotFoundError – Raised if a product id cannot be found.
search(aoi, products, start_datetime=None, end_datetime=None, cloud_fraction=None, storage_state=None, limit=100, sort_field='acquired', sort_order='asc', date_field='acquired', query=None)[source]¶

Search for Scenes in the Descartes Labs catalog.

Returns a SceneCollection of Scenes that overlap with an area of interest, and meet the given search criteria.

Parameters:
  • aoi (GeoJSON-like dict, GeoContext, or object with __geo_interface__) – Search for scenes that intersect this area by any amount. If a GeoContext, a copy is returned as ctx, with missing values filled in. Otherwise, the returned ctx will be an AOI, with this as its geometry.
  • products (str or List[str]) – Descartes Labs product identifiers. May not be empty.
  • start_datetime (str, datetime-like, optional) – Restrict to scenes acquired after this datetime
  • end_datetime (str, datetime-like, optional) – Restrict to scenes acquired before this datetime
  • cloud_fraction (float, optional) – Restrict to scenes that are covered in clouds by less than this fraction (between 0 and 1)
  • storage_state (str, optional) – Filter results based on storage_state value ("available", "remote", or None)
  • limit (int or None, optional, default 100) – Maximum number of Scenes to return, or None for all results.
  • sort_field (str, optional, default 'acquired') – Field name in Scene.properties by which to order the results
  • sort_order (str, optional, default 'asc') – "asc" or "desc"
  • date_field (str, optional, default 'acquired') – The field used when filtering by date ("acquired", "processed", "published")
  • query (Expression, optional) – Expression used to filter Scenes by their properties, built from dl.properties. You can construct filter expression using the ==, !=, <, >, <= and >= operators as well as the like() and in_() methods. You cannot use the boolean keywords and and or because of Python language limitations; instead you can combine filter expressions with & (boolean “and”) and | (boolean “or”). Example: 150 < dl.properties.azimuth_angle < 160 & dl.properties.cloud_fraction < 0.5
  • randomize (bool, default False, optional) – Randomize the order of the results. You may also use an int or str as an explicit seed.
Returns:

  • scenes (SceneCollection) – Scenes matching your criteria.

  • ctx (GeoContext) – The given aoi as a GeoContext (if it isn’t one already), with reasonable default parameters for loading all matching Scenes.

    If aoi was a GeoContext, ctx will be a copy of aoi, with any properties that were None assigned the defaults below.

    If aoi was not a GeoContext, an AOI instance will be created with aoi as its geometry, and defaults assigned as described below:

    Default Spatial Parameters:

    • resolution: the finest resolution of any band of all matching scenes
    • crs: the most common CRS used of all matching scenes

search_bands(products, limit=None, wavelength=None, resolution=None, tags=None)[source]¶

Search for imagery data bands that you have access to.

Parameters:
  • products (list(str)) – A list of product(s) to return bands for. May not be empty.
  • limit (int, optional) – Number of results to return.
  • wavelength (float, optional) – A wavelength in nm e.g 700 that the band sensor must measure.
  • resolution (int, optional) – The resolution in meters per pixel e.g 30 of the data available in this band.
  • tags (list(str), optional) – A list of tags to match. Any band which has any of these tags will be included.
Returns:

List of dicts containing at most limit bands. Empty if there are no bands matching query (e.g. product id not available).

Return type:

DotList(DotDict)

search_derived_bands(bands, require_bands=None, limit=None)[source]¶

Search for predefined derived bands that you have access to.

Parameters:
  • bands (list(str)) – Limit the derived bands to ones that can be computed using this list of spectral bands. e.g [“red”, “nir”, “swir1”]
  • require_bands (bool) – Control whether searched bands must contain all the spectral bands passed in the bands param. Defaults to False.
  • limit (int) – Number of results to return.
Returns:

List of dicts containing at most limit bands.

Return type:

DotList(DotDict)

search_products(limit=None, owner=None, text=None)[source]¶

Search products that are available on the platform. An empty search with no parameters will pass back all available products.

Parameters:
  • limit (int, optional) – Number of results to return.
  • owner (str, optional) – Filter products by the owner’s uuid.
  • text (str, optional) – Filter products by string match.
Returns:

List of dicts containing at most limit products. Empty if no matching products are found.

Return type:

DotList(DotDict)

Next
arrow_forward
arrow_back
Previous

2022 © Descartes Labs

Client Version 1.12.0

  • License
  • Privacy
  • Terms