geoserver发布wms服务的tif影像黑色的背景如何去除

发布时间 2023-10-24 10:19:12作者: 槑孒

在 GeoServer 发布的 TIFF 影像中,白色(或黑色)的背景通常表示影像中的透明部分。

要去除白色背景,可以把将白色部分变为透明。

这通常需要以下步骤:

方法一 图层设置

  1. 打开编辑图层界面——数据

  2. 覆盖参数
    在Input Transparent Color填入需要覆盖的颜色
    比如我想把给色变为透明,则设置#ffffff

可能会出现这个错误,暂时未知,推荐第二种方法
Error: Could not load image because of The source image could not be decoded.. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.

方法二 样式设置

增加opacity=0把对应颜色设置为透明

【Geoserver发布WMS】遥感影像去掉黑色背景的问题