React-Leaflet拼贴具有不同的对比度?

问题描述 投票:0回答:1

[当使用传单式WMSTileLayer(将Geoserver作为WMS服务器)时,各个图块的对比度似乎不同,如下所示,在图块之间创建了可见的“边界”。

传单反应:

enter image description here

如果我在Geoserver中使用图层视图,则会得到一组漂亮的平铺瓷砖。

内置GeoServer查看器:

enter image description here

我现在使用一个非常简单的示例作为测试:enter image description here

我对所有复杂的React或Leaflet都不满意,所以我在与Leaflet反应的文档方面有些挣扎,所以我可能错过了一些非常简单的东西,例如,我没有了解了如何使用png而不是jpeg。

leaflet geoserver react-leaflet
1个回答
0
投票

[3天后,我决定发布。然后2小时后解决。

这里的问题归因于GeoServer(有效地)将其自己的ColorMap应用于所请求的每个图块。解决方案是在相关样式中指定固定的ColorMap:

<ColorMap>
        <ColorMapEntry color="#323232" quantity="-300" label="label1" opacity="1"/>
        <ColorMapEntry color="#BBBBBB" quantity="200" label="label2" opacity="1"/>
</ColorMap>

来自这里的解决方案:https://gis.stackexchange.com/questions/308217/geotiff-rendered-in-openlayers-using-geoserver-tiles-have-different-brightness

© www.soinside.com 2019 - 2024. All rights reserved.