rasterio.rio.main module

Main command group for Rasterio’s CLI.

Subcommands developed as a part of the Rasterio package have their own modules under rasterio.rio (like rasterio/rio/info.py) and are registered in the ‘rasterio.rio_commands’ entry point group in Rasterio’s setup.py:

entry_points=’’’

[console_scripts] rio=rasterio.rio.main:main_group

[rasterio.rio_commands] bounds=rasterio.rio.bounds:bounds calc=rasterio.rio.calc:calc …

Users may create their own rio subcommands by writing modules that register entry points in Rasterio’s ‘rasterio.rio_plugins’ group. See for example https://github.com/sgillies/rio-plugin-example, which has been published to PyPI as rio-metasay.

There’s no advantage to making a rio subcommand which doesn’t import rasterio. But if you are using rasterio, you may profit from Rasterio’s CLI infrastructure and the network of existing commands. Please add yours to the registry

so that other rio users may find it.

rasterio.rio.main.configure_logging(verbosity)
rasterio.rio.main.gdal_version_cb(ctx, param, value)
rasterio.rio.main.show_versions_cb(ctx, param, value)