CLI Tools
callusgs provides four command-line interface tools detailed below.
Note
When supplying coordinates on the command line as is shown below, you need to end the coordinate string with two dashes (–). This stops the program from trying to parse any further arguments. In turn, this also means the AOI must be given as the last argument!
callusgs
usage: callusgs [-h] [--auth-method {password,token,sso,app-guest}]
[--username USERNAME] [--auth AUTH] [--no-relogin] [-v] [-vv]
[-d]
{report,download,geocode,grid2ll,clean} ...
- -h, --help
show this help message and exit
- --auth-method {password,token,sso,app-guest}
Login method to use
- --username <username>
Username to use for authentication
- --auth <auth>
Appropriate authentication key (e.g. password, app token, etc.)
- --no-relogin
The USGS tokens used after login are only valid for two hours. If this flag is set, no automatic re-login is attempted.
- -v, --verbose
Print more logging messages (INFO level and above)
- -vv, --very-verbose
Print even more logging messages (DEBUG level and above)
- -d, --dry-run
Do not perform action
Copyright: Florian Katerndahl <florian@katerndahl.com>
callusgs clean
usage: callusgs clean [-h]
- -h, --help
show this help message and exit
Copyright: Florian Katerndahl <florian@katerndahl.com>
callusgs download
usage: callusgs download [-h] [--no-cite] [--cloudcover CLOUDCOVER CLOUDCOVER]
[--include-unknown-clouds] [--date DATE DATE]
[--months {all,jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec} [{all,jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec} ...]]
[--aoi-coordinates AOI_COORDINATES [AOI_COORDINATES ...]]
[--aoi-file AOI_FILE] [--aoi-type {Mbr,Coordinates}]
--product
{landsat_em_c2_l1,landsat_em_c2_l2,landsat_etm_c2_l1,landsat_etm_c2_l2,landsat_ot_c2_l1,landsat_ot_c2_l2,landsat_ba_tile_c2,landsat_dswe_tile_c2,landsat_fsca_tile_c2,gmted2010,srtm,srtm_v2,srtm_v3,srtm_water_bodies}
[--dem-resolution {7.5,15,30}] [--database DATABASE]
outdir
- outdir
Path to directory where downloaded data should be stored. May not exist prior to program invocation
- -h, --help
show this help message and exit
- --no-cite
Suppress citation output
- --cloudcover <cloudcover>
Cloud cover range
- --include-unknown-clouds
If specfied, include imagery with unknown cloud cover
- --date <date>
Date range for query in YYYY-MM-DD format
- --months {all,jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec}
Limit query to certain months in date range
- --aoi-coordinates <aoi_coordinates>
Coordinate pair(s) given as latitude longitude pairs seperated by space. If a polygon, i.e. more than one coordinate pair, is supplied, it must be closed. [lat1 lon1 lat2 lon2 lat3 lon3 lat1 lon1]. Is overridden when aoi-file is specfiied as well
- --aoi-file <aoi_file>
File containing point or polygon geometry in EPSG:4326 for spatial query. Should the supplied dataset contain either more than one layer and/or more than one feature, all but the first one are disregarded. Takes precedence over aoi-coordinates
- --aoi-type {Mbr,Coordinates}
- --product {landsat_em_c2_l1,landsat_em_c2_l2,landsat_etm_c2_l1,landsat_etm_c2_l2,landsat_ot_c2_l1,landsat_ot_c2_l2,landsat_ba_tile_c2,landsat_dswe_tile_c2,landsat_fsca_tile_c2,gmted2010,srtm,srtm_v2,srtm_v3,srtm_water_bodies}
Data product to query. For product name ‘translations’, refer to the documentation.
- --dem-resolution {7.5,15,30}
Resoltuion for GMTED Digital Elevation Model
- --database <database>
Optional Database in which metadata about scenes and their download link are stored. Note that setting this option does not actually download any data.
Copyright: Florian Katerndahl <florian@katerndahl.com>
callusgs geocode
Query the USGS Geocoder.
usage: callusgs geocode [-h] [--feature-type {US,World}] name
- name
Name of the feature
- -h, --help
show this help message and exit
- --feature-type {US,World}
Type of feature. Where to look for.
Copyright: Florian Katerndahl <florian@katerndahl.com>
callusgs grid2ll
Translate between known grids and coordinates.
usage: callusgs grid2ll [-h] [--grid {WRS1,WRS2}]
[--response-shape {polygon,point}]
coordinates [coordinates ...]
- coordinates
The xy coordinate pairs in the grid system. Coordinate pairs must be given as X1,Y1 X2,Y2 …
- -h, --help
show this help message and exit
- --grid {WRS1,WRS2}
Which grid system is being used?
- --response-shape {polygon,point}
What type of geometry should be returned - a bounding box polygon or a center point?
Copyright: Florian Katerndahl <florian@katerndahl.com>
callusgs report
usage: callusgs report [-h]
- -h, --help
show this help message and exit
Copyright: Florian Katerndahl <florian@katerndahl.com>