<div dir="ltr">I shall give it a try. thanks</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br><br>Kind Regards,<div><font size="4" face="comic sans ms, sans-serif"><b><span style="color:rgb(0,0,0)"><span style="font-family:arial,helvetica,sans-serif">Joseph Kariuki</span></span><br></b></font></div><div><br></div><div><span style="color:rgb(111,168,220)"><u><b>Geospatial Engineer</b></u></span><span style="color:rgb(153,153,153)"><b> | </b></span><u><span style="color:rgb(106,168,79)"><b>GIS / Web Developer</b></span></u><b> </b></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, May 22, 2017 at 4:17 PM, Nikos Alexandris <span dir="ltr"><<a href="mailto:nik@nikosalexandris.net" target="_blank">nik@nikosalexandris.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">* Joseph Kariuki <<a href="mailto:joehene@gmail.com" target="_blank">joehene@gmail.com</a>> [2017-05-22 13:35:44 +0300]:<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi?<br>
<br>
I am trying to perform pansharpening on landsat raster, using pygrass.<br>
Below is the snippet<br>
<br>
</blockquote>
<br></span>
Not answering your question, but please give i.fusion.hpf a try.<br>
<br>
Nikos<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<br>
<br>
*n = 0for x in bluear:<span class=""><br>
mypansharpen.append(grass.run_<wbr>command("i.pansharpen", red=redar[n],<br>
green=greenar[n], blue=bluear[n], pan=panar[n],<br>
                 output=bluear[n][0:21]+"pansh<wbr>arpen", method="ihs"))<br></span>
 n = n + 1*<span class=""><br>
<br>
Running the code returns the following error<br>
<br></span>
*ERROR: Raster map <LE07_L1TP_166060_20161016_201<wbr>61111_01_T1_B8.TIF.aux> not<span class=""><br>
      found<br>
Traceback (most recent call last):<br>
 File "/usr/local/grass-7.2.2svn/scr<wbr>ipts/i.pansharpen", line 452, in <module><br>
   main()<br>
 File "/usr/local/grass-7.2.2svn/scr<wbr>ipts/i.pansharpen", line 119, in main<br>
   kv = grass.raster_info(map=pan)<br>
 File "/usr/local/grass-7.2.2svn/etc<wbr>/python/grass/script/raster.<wbr>py",<br>
line 78, in raster_info<br></span>
   s = read_command('<a href="http://r.info" rel="noreferrer" target="_blank">r.info</a> <<a href="http://r.info" rel="noreferrer" target="_blank">http://r.info</a>>', flags='gre', map=map)<span class=""><br>
 File "/usr/local/grass-7.2.2svn/etc<wbr>/python/grass/script/core.py",<br>
line 461, in read_command<br>
   return handle_errors(returncode, stdout, args, kwargs)<br>
 File "/usr/local/grass-7.2.2svn/etc<wbr>/python/grass/script/core.py",<br>
line 329, in handle_errors<br>
   returncode=returncode)<br>
grass.exceptions.CalledModuleE<wbr>rror: Module run None ['<a href="http://r.info" rel="noreferrer" target="_blank">r.info</a><br></span>
<<a href="http://r.info" rel="noreferrer" target="_blank">http://r.info</a>>', '-gre',<span class=""><br>
'map=LE07_L1TP_166060_20161016<wbr>_20161111_01_T1_B8.TIF.aux'] ended with<br>
error<br>
Process ended with non-zero return code 1. See errors in the (error) output.<br>
Traceback (most recent call last):<br>
 File "/home/hempire/PycharmProjects<wbr>/GRASSproject/landsatProcessin<wbr>g.py",<br>
line 185, in <module><br>
   output=bluear[n][0:21]+"pansh<wbr>arpen", method="ihs"))<br>
 File "/usr/local/grass-7.2.2svn/etc<wbr>/python/grass/script/core.py",<br>
line 410, in run_command<br>
   return handle_errors(returncode, returncode, args, kwargs)<br>
 File "/usr/local/grass-7.2.2svn/etc<wbr>/python/grass/script/core.py",<br>
line 329, in handle_errors<br>
   returncode=returncode)<br>
grass.exceptions.CalledModuleE<wbr>rror: Module run None ['i.pansharpen',<br>
'blue=LE07_L1TP_166060_2003030<wbr>3_20170126_01_T1_B2',<br>
'green=LE07_L1TP_166060_200303<wbr>03_20170126_01_T1_B3',<br>
'pan=LE07_L1TP_166060_20161016<wbr>_20161111_01_T1_B8.TIF.aux',<br>
'output=LE07_L1TP_166060_2003p<wbr>ansharpen', 'method=ihs',<br>
'red=LE07_L1TP_166060_20030303<wbr>_20170126_01_T1_B4'] ended with error<br></span>
Process ended with non-zero return code 1. See errors in the (error) output.*<span class=""><br>
<br>
Note that I have also tried grass.read_command in place of<br>
grass.run_command but still getting the same error output.<br>
<br>
<br>
<br>
<br>
Kind Regards,<br>
<br></span>
*Joseph Kariuki*<br>
<br>
*Geospatial Engineer** | **GIS / Web Developer*<br>
</blockquote><div class="HOEnZb"><div class="h5">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
______________________________<wbr>_________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/grass-user</a><br>
</blockquote>
<br>
<br></div></div><span class="HOEnZb"><font color="#888888">
-- <br>
Nikos Alexandris | Remote Sensing & Geomatics<br>
GPG Key Fingerprint 6F9D4506F3CA28380974D31A905353<wbr>4B693C4FB3 </font></span></blockquote></div><br></div>