gsdview.gdalbackend.helpers

Core GDAL backend functions and classes.

Classes

AddoDialogHelper(app, tool) Helper class for overviews computation.
AddoHelper(app, tool) Helper class for gdaladdo execution on live datasets.
GdalHelper(app, tool) Basee helper class for running external GDAL tools.
HistDialogHelper(app, tool) Helper class for histogram computation on live raster bands.
StatsDialogHelper(app, tool) Helper class for statistics computation on live raster bands.
StatsHelper(app, tool) Helper class for statistics pre-computation on live raster bands.
class gsdview.gdalbackend.helpers.AddoDialogHelper(app, tool)[source]

Bases: gsdview.gdalbackend.helpers.AddoHelper

Helper class for overviews computation.

See also

AddoHelper

do_finalize()[source]
reset()[source]
start(item, dialog=None)[source]
target_levels(dataset)[source]
class gsdview.gdalbackend.helpers.AddoHelper(app, tool)[source]

Bases: gsdview.gdalbackend.helpers.GdalHelper

Helper class for gdaladdo execution on live datasets.

In GSDView an external process running the gdaladdo is used to add oveviews to (virtual) dataset that are already open in GSDView itself.

Unfortunately, as far as I know, there is no way to safely handle two dataset objects (pointing at the same vrt file) in two different processes.

This helper class provides functions to perform overview computation on a private environment and then move the ovr/aux file back to the main cache folder of the dataset. After that the dataset is re-opened an all changes are safely reflected to the GUI.

In case the overview computation is stopped before completion then the private gdaladdo environment is simply cleaned and no side effect arises.

Note

if one wants to add overviews to a vrt dataset that already has overviews (i.e. the ovr/aux file already exists) then the ovr/aux file should be copyed in the private gdaladdo environment before starting computation.

In this way the pre-existing overview are preserved but the copy operation could be heavy weight.

Maybe some suggestion can be asked on the GDAL mailing-list.

An alternative solution, the one currently implemented, is to force recomputation of all overview levels (exixting ones and newly selected) and then replace the ol overview file.

This solution is not efficient since it doesn’t re-use existing overviews but ensure no data loss in case the operation is stopped by the user.

do_finalize()[source]
do_start(item)[source]
reset()[source]
target_levels(dataset)[source]
class gsdview.gdalbackend.helpers.GdalHelper(app, tool)[source]

Bases: object

Basee helper class for running external GDAL tools.

Helper classes provide a common set of functionality for running GDAL tools in separate processes. Task performed are:

  • tool setup
  • temporay files and diractories creation
  • temporay files and diractories cleanup
  • finalization actions
cleanup()[source]
controller[source]
do_finalize()[source]
do_finalize_on_error()[source]
do_start(*args, **kwargs)[source]
finalize(returncode=0)[source]
gdalbackend[source]
logger[source]
static ovrfiles(dirname)[source]
reset()[source]
setProgressRange(minimum, maximum)[source]
setup_progress_dialog(title='')[source]
setup_tmpdir(dataset)[source]

Create a temporary diran copy the virtual file into it.

start(*args, **kwargs)[source]
class gsdview.gdalbackend.helpers.HistDialogHelper(app, tool)[source]

Bases: gsdview.gdalbackend.helpers.StatsDialogHelper

Helper class for histogram computation on live raster bands.

apply()[source]
copy_data(vrtband)[source]
class gsdview.gdalbackend.helpers.StatsDialogHelper(app, tool)[source]

Bases: gsdview.gdalbackend.helpers.StatsHelper

Helper class for statistics computation on live raster bands.

apply()[source]
reset()[source]
start(item, dialog=None)[source]
class gsdview.gdalbackend.helpers.StatsHelper(app, tool)[source]

Bases: gsdview.gdalbackend.helpers.GdalHelper

Helper class for statistics pre-computation on live raster bands.

apply()[source]
copy_data(vrtband)[source]
do_finalize()[source]
do_start(item)[source]
reset()[source]

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

Previous topic

gsdview.gdalbackend.gdalsupport

Next topic

gsdview.gdalbackend.info

This Page