[GRASS-user] Error with pansharpening

Vishal Mehta vishalm1975 at gmail.com
Wed Feb 23 11:21:29 PST 2022


Hi all,

I'm using GRASS 7.8 on WIndows 10, and trying out some of the Landsat
routines.

I'm getting an error on pan sharpening, at the very end of the processing:
and i see some temp files have been created. is there a way to fix this?
Thanks, Vishal
---
Wed Feb 23 11:14:22 2022)

i.pansharpen red=Refl_3 at PERMANENT green=Refl_2 at PERMANENT
blue=Refl_1 at PERMANENT
pan=LC08_L1TP_044033_20180225_20180308_01_T1_B8 at PERMANENT
output=brovey_pansharpen method=brovey bitdepth=8
Using 8bit image channels
Performing pan sharpening with hi res pan image: 15.000000
Pan channel/intensity histogram matching using linear regression
Histogram matching...
Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS3~1.10\apps\grass\grass78/scripts/i.
pansharpen.py", line 632, in <module>
    main()
  File "C:\PROGRA~1\QGIS3~1.10\apps\grass\grass78/scripts/i.
pansharpen.py", line 257, in main
    brovey(pan, ms1, ms2, ms3, out, pid, sproc)
  File "C:\PROGRA~1\QGIS3~1.10\apps\grass\grass78/scripts/i.
pansharpen.py", line 315, in brovey
    panmatch1 = matchhist(pan, ms1, outname)
  File "C:\PROGRA~1\QGIS3~1.10\apps\grass\grass78/scripts/i.
pansharpen.py", line 552, in matchhist
    stats = stats_out.communicate()[0].split('\n')[:-1]
TypeError: a bytes-like object is required, not 'str'
(Wed Feb 23 11:14:31 2022) Command finished (9 sec)

---
(Wed Feb 23 11:15:33 2022)

i.pansharpen red=Refl_3 at PERMANENT green=Refl_2 at PERMANENT
blue=Refl_1 at PERMANENT
pan=LC08_L1TP_044033_20180225_20180308_01_T1_B8 at PERMANENT
output=ihs_pansharpen bitdepth=8
Using 8bit image channels
Performing pan sharpening with hi res pan image: 15.000000
Transforming to IHS color space...
Histogram matching...
Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS3~1.10\apps\grass\grass78/scripts/i.
pansharpen.py", line 632, in <module>
    main()
  File "C:\PROGRA~1\QGIS3~1.10\apps\grass\grass78/scripts/i.
pansharpen.py", line 259, in main
    ihs(pan, ms1, ms2, ms3, out, pid, sproc)
  File "C:\PROGRA~1\QGIS3~1.10\apps\grass\grass78/scripts/i.
pansharpen.py", line 380, in ihs
    panmatch = matchhist(pan, target, outname)
  File "C:\PROGRA~1\QGIS3~1.10\apps\grass\grass78/scripts/i.
pansharpen.py", line 552, in matchhist
    stats = stats_out.communicate()[0].split('\n')[:-1]
TypeError: a bytes-like object is required, not 'str'
(Wed Feb 23 11:16:06 2022) Command finished (33 sec)



-- 
Vishal K. Mehta, PhD
Sr. Scientist
Stockholm Environment Institute - US
133 D St Suite F
Davis CA 95616
www.sei-us.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20220223/0efd339e/attachment.html>


More information about the grass-user mailing list