pdemtools.search function

Contents

pdemtools.search function#

pdemtools.search(dataset: Literal['arcticdem', 'rema'] | None = None, dates: str | tuple | None = None, months: int | tuple | None = None, years: int | tuple | None = None, baseline_max_hours: int | None = None, bounds: tuple | Polygon | None = None, min_aoi_frac: float | None = None, min_aoi_km2: float | None = None, sensors: str | tuple | None = None, is_xtrack: bool | None = None, is_lsf: bool | None = None, rmse: float | tuple | None = None, accuracy: float | tuple | None = None, index_fpath: str | None = None, include_custom_columns: bool | None = True)#

Efficiently search the ArcticDEM and REMA strip index files provided by the Polar Geospatial Center.

Parameters:
  • dataset (str) – Either ‘arcticdem’ or ‘rema’. Case-insensitive. Must be provided if the dynamic STAC is being queried (default operation). If a local index_fpath is provided, then an attempt will be made to infer the dataset from the file name.

  • dates (str | tuple, optional) – Filter strips to a date range. Dates can be provided as a tuple of two strings, or a single string with a / seperator. Date strings must be interpetable by the pandas.to_datetime() tool. For an open search, one of the dates can be set to None.

  • months (tuple, optional) – Filter strips to only certain months. Provide as a tuple of integers (e.g. for June, July, August strips only, set months = [6,7,8]).

  • years (tuple, optional) – Filter strips to only certain years. Provide as a tuple of integers (e.g. for 2011 and 2021 only, set years = [2011,2021]).

  • baseline_max_hours (int, optional) – Filter strips to only those constructed from stereopairs acquired less than the provided number of hours apart.

  • bounds (tuple | Polygon, optional) – Filter to strips that intersect with bounds [xmin, ymin, xmax, ymax], in EPSG:3413 (ArcticDEM) or EPSG:3031 (REMA). Accepts a tuple or a shapely.Polygon geometry to extract bounds from.

  • min_aoi_frac (float, optional) – Filter to strips than cover more the defined fraction of the area of interest (defined by the bounds variable). Must be between 0 and 1, and bounds must be defined.

  • min_aoi_km2 (float, optional) – Filter to strips than cover more the defined area of interest (defined by the bounds variable) in square kilometres.

  • sensors (tuple, optional) – Filter scenes to only those consrtructed from the provided satellite sensors. Full list is [“WV03”, “WV02”, “WV01”, “GE01”]

  • is_xtrack (bool, optional) – Filter based on whether stereopairs are cross-track imagery. True = return only cross-track. False = return only non-cross-track.

  • rmse (float | tuple, optional) – Filter based on the provided RMSE in metres from the PGC strip metadata. NB that this column can include NaN values (-1.0 or -9999.0) so the option is provided to include only a single value as an upper range (e.g. 2), or a tuple of two values in order to include a lower bound and filter NaN values (e.g [0, 2]).

  • accuracy (float | tuple, optional) – Filter to strip accuracies based on the metadata-provided avg_expected_height_accuracy in metres. NB that this column can include NaN values (-1.0 or -9999.0) so the option is provided to include only a single value as an upper range (e.g. 2), or a tuple of two values in order to include a lower bound and filter NaN values (e.g [0, 2]).

  • index_fpath (str) – Filepath to a local copy of the ArcticDEM or REMA strip index file, available from the Polar Geospatial Center. For speed, it is tecommended that the index is .parquet format. If none is provided, the function will instead interact with the PGC dynamic STAC API.

  • include_custom_columns (bool, optional) – Whether to include custom columns generated by pdemtools in geopandas dataframe output. This includes “pdt_time1”, “pdt_time2”, “pdt_dem_baseline_hours”, “pdt_time_mean”, “pdt_year”, “pdt_month”, and “pdt_aoi_frac”. Defaults to True

Returns:

Strip index filtered to desired variables. If no strips are found, returns None with a warning.

Return type:

geopandas.GeoDataFrame