如何设置透明覆盖WMS图层的样式 [英] How to style transparent overlayed WMS layer

查看:751
本文介绍了如何设置透明覆盖WMS图层的样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我成功来检索该片)



问题:如何修改上述WMS请求以将前景色(当前为黑色)更改为某种自定义色彩(例如红色)?换句话说,如何设计图层的样式?服务器显然能够为这一层做到这一点,因为它可以通过用于检索图片 - 请注意它包含比例和徽标,因此它不是合适的图块。)



不幸的是,这个Web应用程序并没有使用WMS来获取这个风格的地图,所以我不能将样式参数复制到WMS请求中。 我必须通过WMS请求来做样式(因为此其他请求格式是专有的,检索整个地图 - 不是为瓦片设计的 - 而且它似乎不支持WGS坐标)我应该怎么做?



我尝试过:


  1. 请查看 WMS文档,特别是 version 1.1.1 SLD ,但它似乎是相当复杂的事情来掌握。 ..

  2. 查看 GetCapabilites命令输出为WMS服务器

  3. 另外,有l ook at DescribeLayer GetStyles 命令输出为我所需的图层(HLMCR)我甚至不知道此图层是否支持通过WMS的样式...

我迷路了,如果你指向正确的方向,我会很感激 - 或者说它甚至可以在WMS中解决(对于这一层)。

这不是可能对我来说也是一个有用的答案!



预先感谢您。

解决方案

乍一看,它看起来像是一个Mapserver 5.x实现,并且getCapabilities注意到在地图级别启用了UserDefinedSymbolization SupportSLD =1,IIRC意味着所有图层应该继承因此,理论上你应该能够在GET请求或某个文件中提供SLD,并将SLD的URL提供给GET请求,并且全部设置。



编写SLD会很烦人,但是如果您认为自己有一些SLD应该可以工作但不能,请将其粘贴到此处。


I successfully overlayed a WMS layer in google maps v3, however, as the information on tiles is black on transparent, it is not well seen on dark background (like satellite map), see some tile for example:

(This was the WMS link to retrieve that tile)

Question: how to modify the above WMS request to change the foreground color (currently black) to some custom color (e.g. red)? In other words, how to style the layer? The server is apparently able to do it for this layer, since it is possible to do it via their web map application (which works in IE only), where you can select the color. See this map image for example:

(The following link was used to retrieve the image - note that it contains scale and logo, so it's not a proper tile.)

Unfortunatelly, this web application doesn't use WMS to get this styled map so I can't just copy the styling parameters to WMS request. I must do the styling via the WMS request (because this other request format is proprietary, retrieves whole map - not designed for tiles - and it doesn't seem to support WGS coordinates) - how shall I do it?

I tried to:

  1. look at the WMS documentation, especially version 1.1.1
  2. look at the SLDs, but it seems pretty complex thing to grasp...
  3. look at the GetCapabilites command output for the WMS server
  4. Also, having look at DescribeLayer and GetStyles command outputs for my desired layer (HLMCR) I don't even know if this layer will support styling over WMS...

I got lost, I'd be grateful if you point me to the right direction - or information if it's even solvable in WMS (for this layer).

"It's not possible" is also a useful answer for me!

Thanks in advance.

解决方案

At first glance, it looks like this is a Mapserver 5.x implementation, and getCapabilities notes that UserDefinedSymbolization SupportSLD="1" is enabled at the Map level, which IIRC means that all Layers should inherit it.

So in theory you should be able to supply SLD either in the GET request or in a file somewhere and supply the URL of your SLD to the GET request, and be all set.

Writing the SLD will be the annoying bit, but if you think you have some SLD that should work but doesn't, paste it here.

这篇关于如何设置透明覆盖WMS图层的样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆