hmp site#
$ hmp site [-h] <action> ...Declare the sites of a workspace
| Command | What it does |
|---|---|
hmp site add | Declare one site in data/sites/catalog.csv |
hmp site import | Declare sites from a table, a vector layer or Hub'Eau stations |
hmp site ls | List the sites declared in data/sites/catalog.csv |
hmp site show | Print 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] nameDeclare one site in data/sites/catalog.csv
| Argument | What it does |
|---|---|
name | Site name: letters, digits and underscores |
--outlet X Y | Outlet coordinates in --crs |
--crs CRS | CRS of the outlet (default: EPSG:2154) |
--label LABEL | Readable name of the catchment |
--gauge GAUGE | Station that measures the catchment |
--uri URI | hubeau:<code> or bdtopage:<code> |
--tag TAG | Tag of the site; repeat for several |
--force | Go 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:J0170000Exit 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
| Argument | What it does |
|---|---|
table | CSV site table in the columns site, label, gauge, uri, x_outlet, y_outlet, crs, tags |
--hubeau | Hub'Eau discharge stations inside --bbox |
--layer LAYER | Vector layer of outlet points |
--bbox XMIN YMIN XMAX YMAX | Box searched, in --crs |
--crs CRS | CRS of the box and of the outlets (default: EPSG:2154) |
--min-years MIN_YEARS | Keep stations open at least this many years (opening to closing, or today) |
--snap-network SNAP_NETWORK | Snap each outlet onto this river network: a vector file, or bdtopage |
--snap-max-m SNAP_MAX_M | Farthest snap in meters; a station farther away is skipped (default: 200) |
--name-field NAME_FIELD | Field holding the site name |
--gauge-field GAUGE_FIELD | Field holding the station code |
--label-field LABEL_FIELD | Field holding the readable name |
--layer-name LAYER_NAME | Layer of a multi-layer file |
--tag TAG | Tag added to every site; repeat for several |
--force | Go 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
| Argument | What it does |
|---|---|
--tag TAG | Only the sites carrying this tag |
Also takes the shared options --workspace --format.
Example
$ hmp site ls --tag bretagne --format csvExit codes it sets itself: 10. All exit codes.
hmp site show#
$ hmp site show [-h] [-w WORKSPACE] [--format {table,json,csv}] namePrint one site of data/sites/catalog.csv
| Argument | What it does |
|---|---|
name | Site name |
Also takes the shared options --workspace --format.
Example
$ hmp site show couesnonExit codes it sets itself: 10. All exit codes.