Command line interface#
This page lists all command line interface (CLI) functionalities of GeoUtils. These commands can be run directly from a terminal, without having to launch a Python console.
geoviewer.py#
Visualisation tool for any image supported by GDAL. For single band plots (Single band rasters or with option -band) the image will be rendered as a pseudocolor image using the set or default colormap. For 3 or 4 band data, the image will be plotted as an RGB(A) image. For other band counts, an error will be raised and the option -band must be used.
usage: geoviewer.py [-h] [-cmap CMAP] [-vmin VMIN] [-vmax VMAX] [-band BAND]
[-nocb] [-clabel CLABEL] [-title TITLE] [-figsize FIGSIZE]
[-max_size MAX_SIZE] [-save SAVE] [-dpi DPI]
[-nodata NODATA] [-noresampl]
filename
Positional Arguments#
- filename
str, path to the image
Named Arguments#
- -cmap
str, a matplotlib colormap string (default is from rcParams). This parameter is ignored for multi-band rasters.
Default: “default”
- -vmin
float, the minimum value for colorscale, or can be expressed as a percentile e.g. 5% (default is calculated min value). This parameter is ignored for multi-band rasters.
- -vmax
float, the maximum value for colorscale, or can be expressed as a percentile e.g. 95% (default is calculated max value). This parameter is ignored for multi-band rasters.
- -band
int, for multiband images, which band to display. Starts at 1. (Default is to load all bands and display as rasterio, i.e. asuming RGB(A) and with clipping outside [0-255] for int, [0-1] for float).
- -nocb
If set, will not display a colorbar (Default is to display the colorbar for single-band raster). This parameter is ignored for multi-band rasters.
Default: True
- -clabel
str, the label for the colorscale (Default is empty).
Default: “”
- -title
str, figure title (Default is empty).
Default: “”
- -figsize
str, figure size, must be a tuple of size 2, either written with quotes, or two numbers separated by comma, no space (Default is from rcParams).
Default: “default”
- -max_size
int, image size is limited to max_size**2 for faster reading/displaying (Default is 2000).
Default: 2000
- -save
str, filename to the output filename to save to disk (Default is displayed on screen).
Default: “”
- -dpi
int, dpi value to use when saving figure (Default is from rcParams).
Default: “default”
- -nodata
float, no data value (Default is read from file metadata).
Default: “default”
- -noresampl
True or False, if False then allow dynamic image downscaling, if True, prevent it.
Default: False