如何解决从 gdal_calc.py 获取 4 波段栅格
我在 GeoTIFF 中有 4 个通道栅格。
我需要找到这些栅格的平均值,并以另一个栅格的形式呈现它们,同样是 RGB,然后我得到一个黑白文件。
我怎样才能摆脱这个?
gdal_calc.py -A /var/www/html/algorithm/cut103.tif -B /var/www/html/algorithm/cut1031.tif --
outfile=result.tif --calc="(A+B)/2"
我也尝试使用 gdal_translate -of VRT input.tif input.vrt
我的 input.vrt:
<ColorInterp>Palette</ColorInterp>
<ColorTable>
<Entry c1="170" c2="170" c3="255"/>
<Entry c1="85" c2="170" c3="255"/>
<Entry c1="66" c2="33" c3="18"/>
<Entry c1="159" c2="81" c3="42"/>
<Entry c1="205" c2="169" c3="21"/>
<Entry c1="253" c2="254" c3="3"/>
<Entry c1="230" c2="236" c3="6"/>
<Entry c1="208" c2="223" c3="0"/>
<Entry c1="185" c2="207" c3="2"/>
<Entry c1="162" c2="192" c3="0"/>
<Entry c1="138" c2="175" c3="0"/>
<Entry c1="114" c2="160" c3="0"/>
<Entry c1="91" c2="142" c3="3"/>
<Entry c1="69" c2="129" c3="0"/>
<Entry c1="45" c2="112" c3="0"/>
<Entry c1="37" c2="96" c3="45"/>
<Entry c1="21" c2="84" c3="45"/>
<Entry c1="21" c2="68" c3="45"/>
请别人帮忙
解决方法
感谢社区https://python-pptx.readthedocs.io/en/latest/dev/analysis/cht-axes.html?highlight=logbase 答案找到了。 要解决这个问题,首先必须使用gdal_calk --A_band 计算每个通道,然后使用gdal_merge 将这些通道合并成一个RGB 光栅。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。