Skip to content

ASFSearchResults#

Description#

This class describes a set of search results from the ASF archive. The class provides a convenient way to manage and examine search results, as well as export and download functionality.


Attributes#

  • searchOptions (ASFSearchOptions): The search options used to generate this set of results. May be None in some cases.
  • searchComplete (bool): Flag signifying asf_search.search() sucessfully completed gathering results from CMR.

Methods#

download()#

Iterates over each ASFProduct and downloads them to the specified path.

args:

  • path: The directory into which the products should be downloaded.
  • session: The session to use, in most cases should be authenticated beforehand.
  • processes: Number of download processes to use. Defaults to 1 (i.e. sequential download)

returns: None


geojson()#

ASFSearchResults.__str__() utilizes this method for serialization via json.dumps()

args: None

returns:

  • dict describing the search results as a geojson object.

csv()#

Creates a csv formatted string generator from the results

args: None

returns:

  • A csv formatted string generator

kml()#

Creates a kml formatted string generator from the results

args: None

returns:

  • A kml formatted string generator

Creates a metalink formatted string generator from the results

args: None

returns:

  • A metalink formatted string generator

raise_if_incomplete()#

Use to check if results returned from asf_search.search() are incomplete (this can happen if an error occurs while querying CMR)

args: None

raises:

  • Raises an asf_search.exceptions.ASFSearchError if the results are incomplete