PythonRescaleTest.py 353 Bytes
Newer Older
1 2 3 4 5 6
# -*- coding: utf-8 -*-

#
#  Example on the use of the Rescale 
#
from sys import argv
Julien Malik's avatar
Julien Malik committed
7
import otbApplication as otb
Cyrille Valladeau's avatar
Cyrille Valladeau committed
8

Julien Malik's avatar
Julien Malik committed
9
app = otb.Registry.CreateApplication("Rescale")
10 11

app.SetParameterString("in", argv[1])
12 13 14
app.SetParameterFloat("outmin", 1)
app.SetParameterFloat("outmax", 100)
app.SetParameterString("out", argv[2] + ".tif")
Julien Malik's avatar
Julien Malik committed
15 16

app.ExecuteAndWriteOutput()