Skip to content
Snippets Groups Projects
Commit f3e31303 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

TEST: try patch on one python test

parent 84e478ee
Branches
Tags
No related merge requests found
# -*- coding: utf-8 -*-
#
# Example on the use of the Rescale
# Example on the use of the Rescale
#
from sys import argv
import otbApplication as otb
import os
import sys
if os.name == 'posix':
orig_dlopen_flags = sys.getdlopenflags()
try:
import dl
except ImportError:
try:
import DLFCN as dl
except ImportError:
dl = None
if dl:
sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)
# now load the module !
import otbApplication as otb
sys.setdlopenflags(orig_dlopen_flags)
del dl
del orig_dlopen_flags
else:
import otbApplication as otb
app = otb.Registry.CreateApplication("Rescale")
app.SetParameterString("in", argv[1])
app.SetParameterString("in", sys.argv[1])
app.SetParameterFloat("outmin", 1)
app.SetParameterFloat("outmax", 100)
app.SetParameterString("out", argv[2] + ".tif")
app.SetParameterString("out", sys.argv[2] + ".tif")
app.ExecuteAndWriteOutput()
\ No newline at end of file
app.ExecuteAndWriteOutput()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment