gsdview.gdalbackend.gdalexectools

Custom exectools components for GDAL.

Classes

BaseGdalToolDescriptor(executable[, args, ...]) Base class for GDAL tool descriprors.
GdalAddOverviewDescriptor([cwd, env, ...]) Tool descriptor for the gdaladdo utility program.
GdalInfoDescriptor([cwd, env, ...]) Tool descriptor for the gdalinfo utility program.
GdalOutputHandler([logger, statusbar, ...]) Handler for the GDAL simple progress report to terminal.
Qt4OutputHandler([logger, statusbar, ...]) Qt4 Output Handler.
class gsdview.gdalbackend.gdalexectools.BaseGdalToolDescriptor(executable, args=None, cwd=None, env=None, stdout_handler=None, stderr_handler=None, output_encoding=None)[source]

Bases: exectools.ToolDescriptor

Base class for GDAL tool descriprors.

Parameters:
  • executable – full path of the tool executable or just the tool program name if it is in the system search path
  • args (list) – default args for command (list of strings)
  • cwd – program working directory
  • env – environment dictionary
  • envmerge – if set to True (default) it is the env dictionaty is used to update the system environment
  • stdout_handlerOutputHandler for the stdout of the tool
  • stderr_handlerOutputHandler for the stderr of the tool
  • output_encoding – output encoding, it is used to decode the subprocess ouput

See also

BaseOutputHandler

cmdline(*args, **kwargs)[source]
gdal_config_options(cmd='')[source]
class gsdview.gdalbackend.gdalexectools.GdalAddOverviewDescriptor(cwd=None, env=None, stdout_handler=None, stderr_handler=None)[source]

Bases: gsdview.gdalbackend.gdalexectools.BaseGdalToolDescriptor

Tool descriptor for the gdaladdo utility program.

Initialization:

Parameters:
  • cwd – program working directory
  • env – environment dictionary
  • envmerge – if set to True (default) it is the env dictionaty is used to update the system environment
  • stdout_handlerOutputHandler for the stdout of the tool
  • stderr_handlerOutputHandler for the stderr of the tool
RESAMPLING_METHODS = ['nearest', 'average', 'gauss', 'cubic', 'average_mp', 'average_magphase', 'mode']

resampling methods

TIFF_COMPRESSION_METHODS = ('JPEG', 'LZW', 'PACKBITS', 'DEFLATE')

TIFF compression methods

TIFF_INTERLEAVING_METHODS = ('PIXEL', 'BAND')

TIFF interleaving methods

TIFF_USE_BIGTIFF_MODE = ('IF_NEEDED', 'IF_SAFER', 'YES', 'NO')

Allowed options for BigTIFF flag

cmdline(*args, **kwargs)[source]
compression_method()[source]

TIFF compression method.

This attribute is only used if external overviews are stored in GeoTIFF format.

gdal_config_options(cmd='')[source]
interleaving_method()[source]
photometric_interpretation = None

photometric interpretation: RGB, YCBCR, etc. (only for external overviews in GeoTIFF format). If None use GDAL defaults.

readonly = None

ensure that gdaladdo works in readonly mode

resampling_method()[source]

Resampling method for overviews computation.

set_compression_method(method)[source]
set_interleaving_method(method)[source]
set_resampling_method(method)[source]
set_use_bigtiff_mode(mode)[source]
use_bigtiff_mode()[source]
use_rrd = None

use Erdas Imagine format (.aux) as overview format. If None use GDAL defaults.

class gsdview.gdalbackend.gdalexectools.GdalInfoDescriptor(cwd=None, env=None, stdout_handler=None, stderr_handler=None)[source]

Bases: gsdview.gdalbackend.gdalexectools.BaseGdalToolDescriptor

Tool descriptor for the gdalinfo utility program.

Parameters:
  • cwd – program working directory
  • env – environment dictionary
  • envmerge – if set to True (default) it is the env dictionaty is used to update the system environment
  • stdout_handlerOutputHandler for the stdout of the tool
  • stderr_handlerOutputHandler for the stderr of the tool
checksum = None

force computation of the checksum for each band in the dataset.

cmdline(*args, **kwargs)[source]
hist = None

report histogram information for all bands.

mdd = None

report metadata for the specified domain.

mm = None

force computation of the actual min/max values for each band in the dataset.

noct = None

suppress printing of color table.

nogcp = None

suppress ground control points list printing. It may be useful for datasets with huge amount of GCPs, such as L1B AVHRR or HDF4 MODIS which contain thousands of the ones.

nomd = None

suppress metadata printing. Some datasets may contain a lot of metadata strings.

norat = None

suppress raster attribute table printing.

stats = None

read and display image statistics. Force computation if no statistics are stored in an image.

class gsdview.gdalbackend.gdalexectools.GdalOutputHandler(logger=None, statusbar=None, progressbar=None, blinker=None, **kwargs)[source]

Bases: exectools.qt4.Qt4OutputHandler

Handler for the GDAL simple progress report to terminal.

This progress reporter prints simple progress report to the terminal window. The progress report generally looks something like this:

“0...10...20...30...40...50...60...70...80...90...100 - done.”

Every 2.5% of progress another number or period is emitted.

handle_progress(data)[source]

Handle progress data.

Parameters:data – a list containing an item for each named group in the “progress” regular expression: (pulse, percentage, text) for the default implementation. Each item can be None.
reset()[source]

Get GSDView at SourceForge.net. Fast, secure and Free Open Source software downloads

Previous topic

gsdview.gdalbackend.core

Next topic

gsdview.gdalbackend.gdalqt4

This Page