I access this WMS (link) which is returned in only .png/.jpg/.gif in a pre-defined colour-scale. I want to change those colours and am asking myself if I can set up a custom style for the rasters. I'm now assuming the answer would be a bald 'no, it's a raster'. But I'm looking for maybe a work-around? I can also access the point-features which it is based on (link). Can I use some sort of styling or filters to colour the cells according their elevation ('on-the-fly')?

For more clarity I have the WMS running on here. The web page is in Dutch and the layer you should look for is 'Lodingen' (enabled by default).

  • I think this is not possible directly, maybe using you own server that supports WMS Cascading and styling and serving your desired layer. – Jose Hermosilla Rodrigo Jul 6 '17 at 21:49
  • 1
    Is the WMS service SLD enabled? – nmtoken Jul 6 '17 at 23:02
  • did you try sending a new SLD in the SLD_BODY parameter? – Ian Turton Jul 7 '17 at 8:31
  • Maybe you want to have a look at the css filter-properties which you can apply to the single raster tiles, see css-tricks.com/almanac/properties/f/filter for a detailed overview of the available filters. However you can't assign new color values totally independent from each other with this method. – tallistroan Jul 7 '17 at 11:12

It's difficult to tell looking at the WMS layer whether the raw coverage data, being provided as an image through the WMS, is a raster if it is then you won't be able to supply an external SLD to change the colours rendered. If it is actually vector data, and if SLD capability is enabled in the service then it should be possible to supply your own style as part of the GetMap request.

You also mention that you can access the point features (as part of a Web Coverage Service), if there is also a Web Coverage Processing Service (WCPS) associated with the service then you would be able to send a processing request that would change the colours. Otherwise you will need to download the coverage data and style the data in your own application.

  • I simply do not know about the servers SLD capabilities; is there a way to check it? And then also, how to know if it's based on vectors or not?And yes, I can indeed download all the points, colour them en export them over and over and over again. The problem is that the dataset is updated daily and I don't want to download and process it every day. Unfortunately, the server does not support WCPS. – Willem van Opstal Jul 7 '17 at 10:10
  • The standard way is to advertise the capability in the GetCapabilities response, but sometimes it is not thus advertised. I tried both a GetStyles and a DescribeLayer operation for your layer, and got exceptions, so it's probable that you are out of luck – nmtoken Jul 7 '17 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.