hmp site#

$ hmp site [-h] <action> ...

Declare the sites of a workspace

CommandWhat it does
hmp site addDeclare one site in data/sites/catalog.csv
hmp site importDeclare sites from a table, a vector layer or Hub'Eau stations
hmp site lsList the sites declared in data/sites/catalog.csv
hmp site showPrint one site of data/sites/catalog.csv

hmp site add#

$ hmp site add [-h] [-w WORKSPACE] [--format {table,json,csv}] [--outlet X Y] [--crs CRS] [--label LABEL] [--gauge GAUGE] [--uri URI] [--tag TAG] [--force] name

Declare one site in data/sites/catalog.csv

ArgumentWhat it does
nameSite name: letters, digits and underscores
--outlet X YOutlet coordinates in --crs
--crs CRSCRS of the outlet (default: EPSG:2154)
--label LABELReadable name of the catchment
--gauge GAUGEStation that measures the catchment
--uri URIhubeau:<code> or bdtopage:<code>
--tag TAGTag of the site; repeat for several
--forceGo past the refusal: replace a site of the same name, accept an outlet close to another

Also takes the shared options --workspace --format.

Example

$ hmp site add couesnon --outlet 377120 6831410 --gauge J017000001 --uri hubeau:J0170000

Exit codes it sets itself: 10 14. All exit codes.

hmp site import#

$ hmp site import [-h] [-w WORKSPACE] [--dry-run] [--format {table,json,csv}] [--hubeau] [--layer LAYER] [--bbox XMIN YMIN XMAX YMAX] [--crs CRS] [--min-years MIN_YEARS] [--snap-network SNAP_NETWORK] [--snap-max-m SNAP_MAX_M] [--name-field NAME_FIELD] [--gauge-field GAUGE_FIELD] [--label-field LABEL_FIELD] [--layer-name LAYER_NAME] [--tag TAG] [--force] [table]

Declare sites from a table, a vector layer or Hub'Eau stations

ArgumentWhat it does
tableCSV site table in the columns site, label, gauge, uri, x_outlet, y_outlet, crs, tags
--hubeauHub'Eau discharge stations inside --bbox
--layer LAYERVector layer of outlet points
--bbox XMIN YMIN XMAX YMAXBox searched, in --crs
--crs CRSCRS of the box and of the outlets (default: EPSG:2154)
--min-years MIN_YEARSKeep stations open at least this many years (opening to closing, or today)
--snap-network SNAP_NETWORKSnap each outlet onto this river network: a vector file, or bdtopage
--snap-max-m SNAP_MAX_MFarthest snap in meters; a station farther away is skipped (default: 200)
--name-field NAME_FIELDField holding the site name
--gauge-field GAUGE_FIELDField holding the station code
--label-field LABEL_FIELDField holding the readable name
--layer-name LAYER_NAMELayer of a multi-layer file
--tag TAGTag added to every site; repeat for several
--forceGo past the refusal: replace sites of the same name, accept outlets close to others

Also takes the shared options --workspace --dry-run --format.

Examples

$ hmp site import stations.csv --tag bretagne
$ hmp site import --hubeau --bbox 150000 6700000 420000 6900000 --min-years 10
$ hmp site import --layer exutoires.gpkg --name-field code --gauge-field station

Exit codes it sets itself: 2 10. All exit codes.

hmp site ls#

$ hmp site ls [-h] [-w WORKSPACE] [--format {table,json,csv}] [--tag TAG]

List the sites declared in data/sites/catalog.csv

ArgumentWhat it does
--tag TAGOnly the sites carrying this tag

Also takes the shared options --workspace --format.

Example

$ hmp site ls --tag bretagne --format csv

Exit codes it sets itself: 10. All exit codes.

hmp site show#

$ hmp site show [-h] [-w WORKSPACE] [--format {table,json,csv}] name

Print one site of data/sites/catalog.csv

ArgumentWhat it does
nameSite name

Also takes the shared options --workspace --format.

Example

$ hmp site show couesnon

Exit codes it sets itself: 10. All exit codes.