Skip to content

Commit f5264a1

Browse files
committed
docs: update readme
1 parent 837f286 commit f5264a1

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

.lintr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
linters: linters_with_defaults(
2+
indentation_linter(2),
3+
object_name_linter = NULL)
4+

README.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,24 @@ Examples:
3333
hfsubset -o ./sacramento_flowpaths.gpkg -t xy -121.494400,38.581573
3434

3535
Environment Variables:
36-
${HFSUBSET_ENDPOINT} - Endpoint to use for subsetting, defaults to 'https://www.lynker-spatial.com/hydrofabric/hfsubset/'.
37-
Note: the endpoint must end with a trailing slash.
36+
${HFSUBSET_ENDPOINT} - Endpoint to use for subsetting,
37+
defaults to 'https://www.lynker-spatial.com/hydrofabric/hfsubset/'.
38+
Note: the endpoint must end with a trailing slash.
3839

3940
Details:
40-
* Finding POI identifiers can be done visually through https://www.lynker-spatial.com/hydrolocations.html
41+
* Finding POI identifiers can be done visually
42+
through https://www.lynker-spatial.com/hydrolocations.html
4143

42-
* When using identifier type 'xy', the coordinates are in OGC:CRS84 order, which is the same reference
43-
system as EPSG:4326 (WGS84), but uses longitude-latitude axis order rather than latitude-longitude.
44+
* When using identifier type 'xy', the coordinates are in OGC:CRS84 order,
45+
which is the same reference system as EPSG:4326 (WGS84), but uses
46+
longitude-latitude axis order rather than latitude-longitude.
4447

4548
* When using identifier type 'nldi', the identifiers follow the syntax
4649

4750
<featureSource>:<featureID>
4851

49-
For example, USGS-08279500 is accessed with featureSource 'nwissite', so this gives the form 'nwissite:USGS-08279500'
52+
For example, USGS-08279500 is accessed with featureSource 'nwissite',
53+
so this gives the form 'nwissite:USGS-08279500'
5054

5155
Options:
5256
-debug
@@ -63,12 +67,27 @@ Options:
6367
Hydrofabric type, only "reference" is supported (default "reference")
6468
-t string
6569
One of: "hf", "comid", "hl", "poi", "nldi", or "xy" (default "hf")
66-
-v v
70+
-v string
6771
Hydrofabric version (NOTE: omit the preceeding v) (default "2.2")
6872
-verify
6973
Verify that endpoint is available (default true)
74+
-w string
75+
Comma-delimited list of weights to generate over the subset.
7076
```
7177

78+
### Generating Forcing Weights
79+
80+
The `-w` flag allows server-side generation of forcing weights on the requested subset,
81+
as of v1.1.0, only `medium_range` is supported. Note that the `divides` layer must be
82+
requested for this flag to be available.
83+
84+
```bash
85+
hfsubset -w medium_range -t nldi "nwissite:USGS-08279500"
86+
```
87+
88+
The above call will generate a subset `hydrofabric.gpkg` containing the
89+
table `weight_grid_medium_range`.
90+
7291
## License
7392

7493
`hfsubset` is distributed under [GNU General Public License v3.0 or later](LICENSE.md)

cli/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ func main() {
210210
opts := SubsetRequest{}
211211
opts.IdType = flag.String("t", "hf", `One of: "hf", "comid", "hl", "poi", "nldi", or "xy"`)
212212
opts.SubsetType = flag.String("s", "reference", `Hydrofabric type, only "reference" is supported`)
213-
opts.Version = flag.String("v", "2.2", "Hydrofabric version (NOTE: omit the preceeding `v`)")
213+
opts.Version = flag.String("v", "2.2", "Hydrofabric version (NOTE: omit the preceeding v)")
214214
opts.Output = flag.String("o", "hydrofabric.gpkg", "Output file name")
215215
flag.BoolVar(&quiet, "quiet", false, "Disable logging")
216216
flag.BoolVar(&debug, "debug", false, "Run in debug mode")

0 commit comments

Comments
 (0)