scrappi.interface

scrappi.interface#

High-level scrappi interface helpers.

This module provides the user-facing convenience functions used throughout scrappi to create API and filesystem handler instances, run queries and to download products. The helpers bridge the ScrappiContext to concrete adapter implementations.

Functions

download_product(product[, context])

Download catalogue product(s), provided as ProductItem or ProductItemSet, to file system path

download_product_filename(product[, context])

Download catalogue product(s), provided as filename string, to file system path

download_product_scene(product[, context])

Download catalogue product(s), provided as scene_id (url field in ProductItem) string, to file system path

generate_bounding_box(latitude, longitude, ...)

Return list of coordinates of a square box around a point

get_api_name(collection[, all_apis, context])

Return name of API call handler capable of reading in desired satellite collection.

is_insitu_collection(collection)

Return whether collection is an in situ collection

list_collections([guess, context])

Return a list of accepted collection strings which can be used to query products

make_api([api, context])

Return specified API call handler

make_fs([fs, context])

Return specified file system call handler.

make_query_start_stop(collection, ...)

Make a query with a given region and start and end time

make_query_with_tolerance(collection, ...[, ...])

Make a query with a given spatial and temporal tolerance

parse_queries_orbitx(ds_orbitx)

Function to parse individual queries that scrappi should run from the output of orbitx

perform_query(query[, context])

Return catalogue product url(s) that satisfy query

set_credentials(api, credentials[, context, ...])

Set credentials for a given API

update_context_file(context_update)

Update context file with provided dictionary