Package: eodms-api-client
EODMS API ClientA Python3 package for querying, ordering and downloading from the REST API provided by Natural Resources Canada'sEarth Observation Data Management System (EODMS).Heavily influenced by the utterly fantasticsentinelsatpackage:https://github.com/sentinelsat/sentinelsatUsage:Full documentation and real-world example onGitHub Pages!Quickstart:Create a new environment withcondaconda create -n eodms-env eodms-api-client -c conda-forgeconda activate eodms-env... or install with pipWarningPip is not recommendedmay clobber your existing Python environmentmay be problematic with Windows+GDALpip install eodms-api-clientUse the CLIGiven a geojson file containing search geometry (Point, Line, Polygon), query - but do not order - the RCM collection for products in the last 24hrs and dump the results to a geojson file for inspection (query_results.geojson)eodms -c RCM -g query_aoi.geojson --dump-resultsSame query as above, but this time submit an order for all products found by the query instead of saving a result fileeodms -c RCM -g query_aoi.geojson --submit-orderAfter submitting an order, this package will return a list of Order IDs that users should take note of as these will be used to download the imagery once the order is complete:eodms -c RCM --order-id [integer Order ID]If your order produced several Order IDs (e.g. more than 50 images ordered at once), you may wish to create a text file of line-separated Order IDs to feed to the package:eodms -c RCM --order-ids [path to text file containing integer Order IDs]Use interactively in a Python REPLRepeating the same query as the CLI example above in a Python REPL allows you to manually inspect the results and do all sorts of interesting things with the query result geodataframe.For example, one may wish to inspect the image metadata to check approximate download sizes. One may also want to inspect the image footprints to ensure that they are ordering only the images which have most-optimal coverage of theirquery_aoi.geojson.>>>fromeodms_api_clientimportEodmsAPI>>>x=EodmsAPI(collection='RCM')>>>x.query(geometry='query_aoi.geojson')>>>type(x.results)geopandas.geodataframe.GeoDataFrameList of possible CLI argumentseodms --helpUsage: eodms [OPTIONS]Options:-u, --username TEXT             EODMS username (leave blank to use .netrc orbe prompted)-p, --password TEXT             EODMS password (leave blank to use .netrc orbe prompted)-c, --collection TEXT           EODMS collection to search  [required]-s, --start TEXT                Beginning of acquisition time window(default to 1 day prior to now)-e, --end TEXT                  End of acquisition time window (default tonow)-g, --geometry PATH             File containing vector feature(s) used toconstrain the query results to a spatialregion-pt, --product-type TEXT        Limit results to a certain image producttype-pf, --product-format [GeoTIFF|NITF21]Limit results to a certain image productformat-sr, --spatial-resolution TEXT  Limit results to the desired spatialresolution-rel, --relative-orbit TEXT     Limit results to the desired relative orbitId-abs, --absolute-orbit TEXT     Limit results to the desired absolute orbitId-ia, --incidence-angle TEXT     Limit results to the desired incidence angle-ial, --incidence-angle-low TEXTLimit results to scenes that have incidenceangles greater than this value (degrees)-iah, --incidence-angle-high TEXTLimit results to scenes that have incidenceangles less than this value (degrees)-rb, --radarsat-beam-mode TEXT  Limit SAR collection results to the desiredbeam mode-rm, --radarsat-beam-mnemonic TEXTLimit SAR collection results to the desiredbeam mnemonic-rp, --radarsat-polarization [CH CV|HH|HH HV|HH HV VH VV|HH VV|HV|VH|VH VV|VV]Limit SAR collection results to the desiredpolarization-ro, --radarsat-orbit-direction [Ascending|Descending]Limit SAR collection results to the desiredorbit type-rl, --radarsat-look-direction [Left|Right]Limit SAR collection results to the desiredantenna look direction-rd, --radarsat-downlink-segment-id TEXTLimit SAR collection results to the desireddownlink segment Id-rs, --rcm-satellite [RCM1|RCM2|RCM3]Limit RCM collection results to the desiredsatellite-cc, --cloud-cover TEXT         Limit optical results to have less than thisamount of cloud cover [0-100]-rn, --roll-number TEXT         Limit NAPL results to the given roll number-pn, --photo-number TEXT        Limit NAPL results to the given photo number--priority [Low|Medium|High|Urgent]What priority to use when submitting orders[default: Medium]-o, --output-dir DIRECTORY      Directory where query results and downloadedimagery will be saved  [default: .]-dr, --dump-results             Whether or not to create a geojson dumpcontaining the results of the query-dfn, --dump-filename TEXT      Filename for query results geojson[default: query_results]--submit-order                  Submit an order to EODMS from the results ofthe current query parameters--record-id INTEGER             Specific Record Id to order from the desiredcollection--record-ids PATH               File of line-separated Record Ids to orderfrom the desired collection--order-id INTEGER              Specific Order Id to download from EODMS--order-ids PATH                File of line-separated Order Ids to downloadfrom EODMS--verbose                       Use debug-level logging--version                       Show the package version-h, --help                      Show this message and exit.ToDo:query RCMquery and order RCMorder with provided record Ids (no query necessary)download given item Ids (no query or order submission necessary)blindly order (skip extra metadata fetching, just order whatever is returned by query)add support for other collections:Radarsat2 (WIP)Radarsat1 (WIP)PlanetScope (WIP)add multi-select functionality for supported collection parametersallow for collection-switching for an existing EodmsAPI instance (must re-evaluate params and rebuild search_url)readthedocs documentation