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:


3 thoughts on “Using appliercontrols for more control over output in RIOS

  1. Cedric Lardeux

    Thanks for this details about RIOS.

    I am a new user of RIOS and even after reading your blog and the applier example from RIOS 1.4 documentation I have one question about how to use multiple Outputs.
    Indeed I tried to apply same things as Inputs for output based on “Arbitrary Numbers of Input (and Output) Files” using outfiles = applier.FilenameAssociations() and outfiles.imgs = MyOutputFileList but it does not work.
    I know that it’s probably not the best area to ask but I don’t find better than your post.

    Best regards

      1. Cedric Lardeux

        Thanks for answer.
        I am working to apply temporal smoothing on time series. So I have one raster for one date and in output the same.

        Thanks for the google group.
        If not possible I will try to put one output with all date as bands but after I need to split it.


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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s