Reorganize cli docs.

This commit is contained in:
Sean Gillies 2014-07-18 11:57:09 -06:00
parent 156678b81b
commit 9b6d71ed2f

View File

@ -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': <type 'numpy.uint8'>,
'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': <type 'numpy.uint8'>,
'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 <https://github.com/mapbox/geojsonio-cli>`__.
@ -117,5 +77,57 @@ use with, e.g., `geojsonio-cli <https://github.com/mapbox/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': <type 'numpy.uint8'>,
'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': <type 'numpy.uint8'>,
'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!