Scene Search
Simple SAR metadata handler for scenes in the ASF archive. |
|
Search for scenes in the Alaska Satellite Facility (ASF) catalog. |
|
Search scenes in the Alaska Satellite Facility (ASF) data catalog. |
|
Central scene search utility. |
- class cesard.search.ASF(meta)[source]
Bases:
IDSimple SAR metadata handler for scenes in the ASF archive. The interface is consistent with the driver classes in
pyroSAR.driversbut does not implement the full functionality due to limited content of the CMR metadata catalog. Registered attributes:acquisition_mode
coordinates
frameNumber
orbit
orbitNumber_abs
orbitNumber_rel
polarizations
product
projection
sensor
start
stop
- scanMetadata()[source]
scan SAR scenes for metadata attributes. The returned dictionary is registered as attribute meta by the class upon object initialization. This dictionary furthermore needs to return a set of standardized attribute keys, which are directly registered as object attributes.
- Returns:
the derived attributes
- Return type:
- class cesard.search.ASFArchive(*args, **kwargs)[source]
Bases:
SceneArchiveSearch for scenes in the Alaska Satellite Facility (ASF) catalog.
- static select(sensor=None, product=None, acquisition_mode=None, mindate=None, maxdate=None, vectorobject=None, date_strict=True, return_value='scene')[source]
Select scenes from the ASF catalog. This is a simple wrapper around the function
asf_select()to be consistent with the interfaces of the other search classes.- Parameters:
acquisition_mode (
str|list[str] |None) – the satellite acquisition modemindate (
str|datetime|None) – the minimum acquisition date; timezone-unaware dates are interpreted as UTC.maxdate (
str|datetime|None) – the maximum acquisition date; timezone-unaware dates are interpreted as UTC.vectorobject (
Vector|None) – a geometry with which the scenes need to overlap. The object may only contain one feature.date_strict (
bool) –treat dates as strict limits or also allow flexible limits to incorporate scenes whose acquisition period overlaps with the defined limit?
strict: start >= mindate & stop <= maxdate
not strict: stop >= mindate & start <= maxdate
return_value (
str|list[str]) – the metadata return value; seeasf_select()for details
- Return type:
- Returns:
the scene metadata attributes as specified with return_value; see
asf_select()for details
See also
- cesard.search.asf_select(sensor=None, product=None, acquisition_mode=None, mindate=None, maxdate=None, vectorobject=None, date_strict=True, return_value='scene')[source]
Search scenes in the Alaska Satellite Facility (ASF) data catalog. This is a simple interface to the asf_search package.
- Parameters:
acquisition_mode (
str|list[str] |None) – the satellite acquisition modemindate (
str|datetime|None) – the minimum acquisition date; timezone-unaware dates are interpreted as UTC.maxdate (
str|datetime|None) – the maximum acquisition date; timezone-unaware dates are interpreted as UTC.vectorobject (
Vector|None) – a geometry with which the scenes need to overlap. The object may only contain one feature.date_strict (
bool) –treat dates as strict limits or also allow flexible limits to incorporate scenes whose acquisition period overlaps with the defined limit?
strict: start >= mindate & stop <= maxdate
not strict: stop >= mindate & start <= maxdate
return_value (
str|list[str]) –the query return value(s). Options:
acquisition_mode: the sensor’s acquisition mode
frameNumber: the frame or datatake number
geometry_wkb: the scene’s footprint geometry formatted as WKB
geometry_wkt: the scene’s footprint geometry formatted as WKT
mindate: the acquisition start datetime in UTC formatted as YYYYmmddTHHMMSS
maxdate: the acquisition end datetime in UTC formatted as YYYYmmddTHHMMSS
product: the product type
scene: the scene’s storage location path (default)
sensor: the satellite platform
- Return type:
- Returns:
the scene metadata attributes as specified with return_value; the return type is a list of strings, tuples, or
ASFobjects depending on whether return_type is of type string, list orASF.
- cesard.search.scene_select(archive, aoi_tiles=None, aoi_geometry=None, return_value='scene', **kwargs)[source]
Central scene search utility. Selects scenes from a database and returns their file names together with the MGRS tile names for which to process ARD products. The list of MGRS tile names is either identical to the list provided with aoi_tiles, the list of all tiles overlapping with aoi_geometry or vectorobject (via kwargs), or the list of all tiles overlapping with an initial scene search result if no geometry has been defined via aoi_tiles or aoi_geometry. In the latter (most complex) case, the search procedure is as follows:
perform a first search matching all other search parameters
derive all MGRS tile geometries overlapping with the selection
derive the minimum and maximum acquisition times of the selection as search parameters mindate and maxdate
extend the mindate and maxdate search parameters by one minute
perform a second search with the extended time range and the derived MGRS tile geometries
filter the search result to scenes overlapping with the initial time range (if defined via mindate or maxdate)
As consequence, if one defines the search parameters to only return one scene, the neighboring acquisitions will also be returned. This is because the scene overlaps with a set of MGRS tiles of which many or all will also overlap with these neighboring acquisitions. To ensure full coverage of all MGRS tiles, the neighbors of the scene in focus have to be processed too.
This function has three ways to define search geometries. In order of priority overriding others: aoi_tiles > aoi_geometry > vectorobject (via kwargs). In the latter two cases, the search geometry is extended to the common footprint of all MGRS tiles overlapping with the initial geometry to ensure full coverage of all tiles.
- Parameters:
archive (
SceneArchive) – an open scene archive connection.aoi_tiles (
list[str] |None) – a list of MGRS tile names for spatial searchaoi_geometry (
str|None) – the name of a vector geometry file for spatial searchreturn_value (
str|list[str]) – the query return value(s). Default ‘scene’: return the scene’s storage location path. See the documentation of archive.select for options.kwargs (
Any) – further search arguments passed to the select method of archive. The date_strict argument has no effect. Whether an ARD product is strictly in the defined time range cannot be determined by this function, and it thus has to add a time buffer. When date_strict=True, more scenes will be filtered out in the last step described above.
- Return type:
- Returns:
a tuple containing
the list of return values; single value: string, multiple values: tuple
the list of MGRS tiles