diff --git a/docs/color.rst b/docs/color.rst index 6a2c614b..9c26edfb 100644 --- a/docs/color.rst +++ b/docs/color.rst @@ -1,11 +1,47 @@ Color ***** -color interpretation --------------------- +Color interpretation +^^^^^^^^^^^^^^^^^^^^^ + +Color interpretation of raster bands can be read from the dataset + + +.. code-block:: python + + >>> src.colorinterp(1) + + +GDAL builds the color interpretation based on the driver and creation options. +With the ``GTiff`` driver, rasters with exactly 3 bands of uint8 type will be RGB, +4 bands of uint8 will be RGBA by default. + +You cannot set the color interpretation on existing data but you can +specify a ``photometric`` string when writing a new raster. + +.. code:: python + + >>> src.profile['dtype'] + 'uint16' + >>> src.colorinterp(2) + + >>> profile = src.profile + >>> profile['photometric'] = "RGB" + >>> with rasterio.open("test.tif", 'w', **profile) as dst: + dst.write(src.read()) + +And the resulting raster will be interpretted as RGB despite having uint16 bands + +.. code:: python + + >>> src.profile['dtype'] + 'uint16' + >>> src.colorinterp(2) + + Colormaps ---------- +^^^^^^^^^ Writing colormaps ----------------- diff --git a/docs/community.rst b/docs/community.rst index 0f14249e..f9c428f3 100644 --- a/docs/community.rst +++ b/docs/community.rst @@ -10,29 +10,34 @@ Community Who is using rasterio? ---------------------- -This study compares map algebra tools of the proprietary ESRI ArcPy library and the open source Rasterio library. -https://github.com/alfalimajuliett/masters-thesis +* `Mapbox`_ uses rasterio to process satellite imagery for it's global satellite base maps. +* Mary Marek-Spartz's masters thesis compares the map algebra tools of the proprietary ESRI ArcPy library and the open source Rasterio library. https://github.com/alfalimajuliett/masters-thesis Software built on rasterio -------------------------- +The following software projects use rasterio + +* pyimpute +* rasterstats Rio plugins ------------ +In addition to the core ``rio`` commands, visit the `Rio plugin registry`_ for a list of external plugins. + Code of conduct --------------- .. include:: ../CODE_OF_CONDUCT.md -Developers guide ------------------------ -.. todo:: +Who are the rasterio developers? +-------------------------------- - Everything developers need to know to get a dev environment running, - run tests, modify code and submit a successful PR. +.. include:: ../AUTHORS.txt - Does this belong here? or a separate docs? +.. _Mapbox: https://mapbox.com +.. _Rio plugin registry: https://github.com/mapbox/rasterio/wiki/Rio-plugin-registry diff --git a/docs/python_manual.rst b/docs/python_manual.rst index 2e1be017..4dc5d4b6 100644 --- a/docs/python_manual.rst +++ b/docs/python_manual.rst @@ -22,4 +22,5 @@ This user's manual is for Python developers who want a clean API for accessing r writing topics osgeo_gdal_migration + developers cookbook