Using appliercontrols for more control over output in RIOS

For more control over writing files in RIOS, you can use the controls class, documented here. The basic usage is to create a ‘controls’ class and pass this to the ‘apply’ function:

from rios import applier
infiles = applier.FilenameAssociations()
infiles.inimage = 'in_image.kea'

outfiles = applier.FilenameAssociations()
outfiles.outimage = 'out_image.kea'

controls = applier.ApplierControls()
applier.apply(userFunc, infiles, outfiles, controls=controls)

Display progress

from rios import cuiprogress
controls.progress = cuiprogress.CUIProgressBar()

Set output driver and creation options


For more information on this, see previous post. For supported creations options for each driver see

Re-project data on-the-fly
If the data are different projections you can reproject them to a reference image using:


Where any of the resampling methods supported by GDAL can be used. A list is available in the gdalwarp documentation.

Set output layer as thematic


Set output later names


Set no data value


This sets the global default value to use as the null value when calculating stats.

For a full list open an interactive Python session and type:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s