Hexagon Geospatial
MENU

WebGIS

Need a push in the right direction when configuring WebMap, Portal or SDI services? Looking for hints and tips, or just looking for Ideas and information? The WebGIS discussion board is where you start those discussions, connect and share information.
Showing results for 
Search instead for 
Do you mean 
Reply
Regular Contributor
Posts: 246
Registered: ‎10-26-2015

WMTS - Source WebMap WMS style

With a WebMap WMTS you can configure tiles to be obtained from a particular WMS layer and the <LayerDefinition> section within the Cache Filler configuration includes a "style" parameter.

 

A customer has a large asset dataset they display through a WMTS and its styled in a particular way. They are setting up a new Portal and the business requirement is to retrieve the same asset data through a WMTS but styled differently.

 

Searching the community I don't think the "style" parameter can be used on the WMTS configuration to request tiles from the same WebMap WMS with a different style as I would need to configure the Cache Filler to include the URL to the SLD file in the request. I am referring to the discussion topic here.

 

Is the only option here to get the customer to create a new WebMap WMS and Service Source configured with the required styling?

 

Thanks,

Colin

Technical Evangelist
Posts: 1,016
Registered: ‎09-11-2015

Re: WMTS - Source WebMap WMS style

Hi Colin,

 

Yes it looks like there's such limitation on the CacheFillerService, if only it would allow additional parameter SLD.

 

However I think the customer might go a much easier way than creating another WMS through the publishing process. If the existing WMS works fine with an SLD style definition, then the customer can temporarily use URL Rewrite module which would detect a specific "style" parameter in the URL, and add the required SLD parameter to the request.

 

Regards,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: WMTS - Source WebMap WMS style

Jan,

Thanks for looking into this and providing a possible solution.

 

I will need to test this. It's been a long time since I work with SLD files. Would you be able to share with me a simple example SLD file and confirm the formating of the SLD parameter I need to add to the WMS request URL?

 

Regards,

Colin

Highlighted
Technical Evangelist
Posts: 1,016
Registered: ‎09-11-2015

Re: WMTS - Source WebMap WMS style

Sure, I just walked around some of SLD files during checking this topic.

 

Sample URL with SLD:

http://win-m9f8bg8j9qe/WMS/service.svc/get?

  SERVICE=WMS&

  REQUEST=GetMap&

  VERSION=1.3.0&

  LAYERS=Rivers&

  FORMAT=image%2Fpng&

  WIDTH=1357&

  HEIGHT=625&

  BBOX=-14243402.928103276,3209281.426965389,-7604021.501630239,6264805.770448338&

  CRS=EPSG%3A3857&

  STYLES=Thick&

  TRANSPARENT=TRUE&

  SLD=http://win-m9f8bg8j9qe/sld_cr.xml

 

Related SLD:

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.1.0" xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:se="http://www.opengis.net/se" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <NamedLayer xmlns="http://www.opengis.net/sld">
      <se:Name>Rivers</se:Name>
      <UserStyle>
         <se:Name>Thick</se:Name>
         <IsDefault/>
         <se:FeatureTypeStyle>
            <se:Rule>
               <se:LineSymbolizer>
                  <se:Stroke>
                     <se:SvgParameter name="stroke">#00FF00</se:SvgParameter>
                     <se:SvgParameter name="stroke-width">30</se:SvgParameter>
                     <se:SvgParameter name="stroke-opacity">0,74</se:SvgParameter>
                  </se:Stroke>
               </se:LineSymbolizer>
            </se:Rule>
         </se:FeatureTypeStyle>
      </UserStyle>
   </NamedLayer>
</StyledLayerDescriptor>
Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Polls
Please register to vote
Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.