From 9b6d71ed2fa1b25837bdb5f790dc6afbaeea2d79 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Fri, 18 Jul 2014 11:57:09 -0600 Subject: [PATCH] Reorganize cli docs. --- docs/cli.rst | 98 +++++++++++++++++++++++++++++----------------------- 1 file changed, 55 insertions(+), 43 deletions(-) diff --git a/docs/cli.rst b/docs/cli.rst index 5d5f7518..1d5b48aa 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -22,51 +22,11 @@ Rasterio's new command line interface is a program named "rio". It is developed using the ``click`` package. -Rio's info command intends to serve some of the same uses as gdalinfo. -.. code-block:: console +bounds +------ - $ rio info rasterio/tests/data/RGB.byte.tif - { 'affine': Affine(300.0379266750948, 0.0, 101985.0, - 0.0, -300.041782729805, 2826915.0), - 'count': 3, - 'crs': { 'init': u'epsg:32618'}, - 'driver': u'GTiff', - 'dtype': , - 'height': 718, - 'nodata': 0.0, - 'transform': ( 101985.0, - 300.0379266750948, - 0.0, - 2826915.0, - 0.0, - -300.041782729805), - 'width': 791} - -The insp command opens a dataset and an interpreter. - -.. code-block:: console - - $ rio insp rasterio/tests/data/RGB.byte.tif - Rasterio 0.9 Interactive Inspector (Python 2.7.5) - Type "src.meta", "src.read_band(1)", or "help(src)" for more information. - >>> import pprint - >>> pprint.pprint(src.meta) - {'affine': Affine(300.0379266750948, 0.0, 101985.0, - 0.0, -300.041782729805, 2826915.0), - 'count': 3, - 'crs': {'init': u'epsg:32618'}, - 'driver': u'GTiff', - 'dtype': , - 'height': 718, - 'nodata': 0.0, - 'transform': (101985.0, - 300.0379266750948, - 0.0, - 2826915.0, - 0.0, - -300.041782729805), - 'width': 791} +New in 0.10. The bounds command writes the bounding boxes of raster datasets to GeoJSON for use with, e.g., `geojsonio-cli `__. @@ -117,5 +77,57 @@ use with, e.g., `geojsonio-cli `__. Shoot the GeoJSON into a Leaflet map using geojsonio-cli by typing ``rio bounds rasterio/tests/data/RGB.byte.tif | geojsonio``. +info +---- + +Rio's info command intends to serve some of the same uses as gdalinfo. + +.. code-block:: console + + $ rio info rasterio/tests/data/RGB.byte.tif + { 'affine': Affine(300.0379266750948, 0.0, 101985.0, + 0.0, -300.041782729805, 2826915.0), + 'count': 3, + 'crs': { 'init': u'epsg:32618'}, + 'driver': u'GTiff', + 'dtype': , + 'height': 718, + 'nodata': 0.0, + 'transform': ( 101985.0, + 300.0379266750948, + 0.0, + 2826915.0, + 0.0, + -300.041782729805), + 'width': 791} + +insp +---- + +The insp command opens a dataset and an interpreter. + +.. code-block:: console + + $ rio insp rasterio/tests/data/RGB.byte.tif + Rasterio 0.9 Interactive Inspector (Python 2.7.5) + Type "src.meta", "src.read_band(1)", or "help(src)" for more information. + >>> import pprint + >>> pprint.pprint(src.meta) + {'affine': Affine(300.0379266750948, 0.0, 101985.0, + 0.0, -300.041782729805, 2826915.0), + 'count': 3, + 'crs': {'init': u'epsg:32618'}, + 'driver': u'GTiff', + 'dtype': , + 'height': 718, + 'nodata': 0.0, + 'transform': (101985.0, + 300.0379266750948, + 0.0, + 2826915.0, + 0.0, + -300.041782729805), + 'width': 791} + Suggestions for other commands are welcome!