Skip to content

Commit f53db5f

Browse files
committed
Format CLI examples
1 parent 4111a71 commit f53db5f

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

README.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,27 @@ Once installed, you can use `snail` directly from the command line.
4747
Split features on a grid defined by its transform, width and height:
4848

4949
```bash
50-
snail split --features input.shp --transform 1 0 -180 0 -1 90 --width 360 --height 180 --output split.gpkg
50+
snail split \
51+
--features input.shp \
52+
--transform 1 0 -180 0 -1 90 \
53+
--width 360 \
54+
--height 180 \
55+
--output split.gpkg
5156
```
5257

5358
Split features on a grid defined by a GeoTIFF, optionally adding the values from each raster band to each split feature as a new attribute:
5459

5560
```bash
56-
snail split --features lines.geojson --raster gridded_data.tif --attribute --output split_lines_with_raster_values.geojson
61+
snail split \
62+
--features lines.geojson \
63+
--raster gridded_data.tif \
64+
--attribute \
65+
--output split_lines_with_raster_values.geojson
5766
```
5867

5968
Split multiple vector feature files along the grids defined by multiple raster files, attributing all raster values:
6069

61-
```
70+
```bash
6271
snail process -fs features.csv -rs rasters.csv
6372
```
6473

@@ -75,6 +84,7 @@ A note on `transform` - these six numbers define the transform from `i,j` cell i
7584
```
7685

7786
In cases without shear or rotation, `a` and `e` define scaling or grid cell size, while `c` and `f` define the offset or grid upper-left corner:
87+
7888
```
7989
| x_scale 0 x_offset |
8090
| 0 y_scale y_offset |
@@ -83,7 +93,6 @@ In cases without shear or rotation, `a` and `e` define scaling or grid cell size
8393

8494
See [`rasterio/affine`](https://github.com/rasterio/affine#usage) and [GDAL Raster Data Model](https://gdal.org/user/raster_data_model.html#affine-geotransform) for more documentation.
8595

86-
8796
## Development
8897

8998
Clone this repository using [GitHub Desktop](https://desktop.github.com/) or on

docs/source/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ climate hazards on infrastructure networks.
3636

3737
.. mdinclude:: ../../README.md
3838
:start-line: 20
39-
:end-line: 85
39+
:end-line: 95
4040

4141

4242
.. toctree::

0 commit comments

Comments
 (0)