[GRASS-user] i.pansharpen error

Nikos Alexandris nik at nikosalexandris.net
Mon May 22 06:17:37 PDT 2017


* Joseph Kariuki <joehene at gmail.com> [2017-05-22 13:35:44 +0300]:

>Hi?
>
>I am trying to perform pansharpening on landsat raster, using pygrass.
>Below is the snippet
>

Not answering your question, but please give i.fusion.hpf a try.

Nikos

>
>
>
>
>*n = 0for x in bluear:
>mypansharpen.append(grass.run_command("i.pansharpen", red=redar[n],
>green=greenar[n], blue=bluear[n], pan=panar[n],
>                  output=bluear[n][0:21]+"pansharpen", method="ihs"))
>  n = n + 1*
>
>Running the code returns the following error
>
>*ERROR: Raster map <LE07_L1TP_166060_20161016_20161111_01_T1_B8.TIF.aux> not
>       found
>Traceback (most recent call last):
>  File "/usr/local/grass-7.2.2svn/scripts/i.pansharpen", line 452, in <module>
>    main()
>  File "/usr/local/grass-7.2.2svn/scripts/i.pansharpen", line 119, in main
>    kv = grass.raster_info(map=pan)
>  File "/usr/local/grass-7.2.2svn/etc/python/grass/script/raster.py",
>line 78, in raster_info
>    s = read_command('r.info <http://r.info>', flags='gre', map=map)
>  File "/usr/local/grass-7.2.2svn/etc/python/grass/script/core.py",
>line 461, in read_command
>    return handle_errors(returncode, stdout, args, kwargs)
>  File "/usr/local/grass-7.2.2svn/etc/python/grass/script/core.py",
>line 329, in handle_errors
>    returncode=returncode)
>grass.exceptions.CalledModuleError: Module run None ['r.info
><http://r.info>', '-gre',
>'map=LE07_L1TP_166060_20161016_20161111_01_T1_B8.TIF.aux'] ended with
>error
>Process ended with non-zero return code 1. See errors in the (error) output.
>Traceback (most recent call last):
>  File "/home/hempire/PycharmProjects/GRASSproject/landsatProcessing.py",
>line 185, in <module>
>    output=bluear[n][0:21]+"pansharpen", method="ihs"))
>  File "/usr/local/grass-7.2.2svn/etc/python/grass/script/core.py",
>line 410, in run_command
>    return handle_errors(returncode, returncode, args, kwargs)
>  File "/usr/local/grass-7.2.2svn/etc/python/grass/script/core.py",
>line 329, in handle_errors
>    returncode=returncode)
>grass.exceptions.CalledModuleError: Module run None ['i.pansharpen',
>'blue=LE07_L1TP_166060_20030303_20170126_01_T1_B2',
>'green=LE07_L1TP_166060_20030303_20170126_01_T1_B3',
>'pan=LE07_L1TP_166060_20161016_20161111_01_T1_B8.TIF.aux',
>'output=LE07_L1TP_166060_2003pansharpen', 'method=ihs',
>'red=LE07_L1TP_166060_20030303_20170126_01_T1_B4'] ended with error
>Process ended with non-zero return code 1. See errors in the (error) output.*
>
>Note that I have also tried grass.read_command in place of
>grass.run_command but still getting the same error output.
>
>
>
>
>Kind Regards,
>
>*Joseph Kariuki*
>
>*Geospatial Engineer** | **GIS / Web Developer*

>_______________________________________________
>grass-user mailing list
>grass-user at lists.osgeo.org
>https://lists.osgeo.org/mailman/listinfo/grass-user


-- 
Nikos Alexandris | Remote Sensing & Geomatics
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3 


More information about the grass-user mailing list