ASFProduct#
Description#
This class describes a single product from the ASF archive. The class provides metadata, as well as several helpful methods for interacting with the product.
Attributes#
properties
(dict): Provides product metadata such as Beam Mode, Start Time, etc.geometry
(dict): Describes the product's physical extents as a geojson snippet.baseline
dict: The product's baseline related fields, if available in CMR.umm
(dict): the raw umm json response from CMR used to populateproperties
,geometry
,baseline
, andmeta
.meta
(dict): the metadata json returned from CMR.
Methods#
geojson()#
ASFProduct.__str__()
utilizes this method for serialization via json.dumps()
args: None
returns:
dict
describing the product as a geojson snippet.
download(path, filename=None, session=None)#
Downloads this product to the specified path and optional filename.
args:
- path: The directory into which this product should be downloaded.
- filename (optional): Filename to use instead of the original filename of this product.
- session (optional): The session to use, in most cases should be authenticated beforehand. If no session is provided, a blank (unauthenticated) session will be used.
- fileType (optional): Used to download Burst XML metadata. Specify
fileType=asf.FileDownloadType.ADDITIONAL_FILES
to download the XML metadata. To download both .tiff and .xml files for bursts, useasf.FileDownloadType.ALL_FILES
- Example:
burst_results.download(session=session, path="./", fileType=asf.FileDownloadType.ADDITIONAL_FILES)
- Note: The Burst XML Metadata is a virtually generated file, and therefore does not have its own unique filename. The XML Metadata can only be found via the burst scene name.
- Example:
returns: None
stack()#
Builds a baseline stack using this product as a reference
args:
- cmr_provider (optional): Custom provider name to constrain CMR results to, for more info on how this is used, see CMR documentation
- session (optional): A Session to be used when performing the search. For most uses, can be ignored. Used when searching for a dataset, provider, etc. that requires authentication. See ASFSession for more details.
- host (optional): SearchAPI host, defaults to Production SearchAPI. This option is intended for dev/test purposes and can generally be ignored.
returns:
ASFSearchResults
representation of the stack, with the addition of baseline values (temporal, perpendicular) attached to eachASFProduct
get_stack_opts()#
Builds search options that describe an InSAR stack based on this product. Similar to stack()
but doesn't perform the search, simply returns ASFSearchOptions
which can be inspected or adjusted and then passed to various search functions.
args: None
returns:
ASFSearchOptions
object
centroid()#
Determines the centroid of a product.
args: None
returns:
shapely.geometry.point.Point
object describing the centroid of the product
remotezip()#
Returns a configured RemoteZip object, which allows downloading selected parts of a product's zip archive.
For more information on how to use remotezip with asf-search, see the Downloading Single Products
section of the example jupyter notebook. For more information on the open-source remotezip package, check out the remotezip project repo.
args:
session
ASFSession: An authenticated ASFSession object that will be used to download the product
returns:
remotezip.RemoteZip
object authenticated with the passed ASFSession object