[MapProxy] Caching styles

Cooney, Tom (EC) tom.cooney at canada.ca
Mon Mar 1 06:59:12 PST 2021


Hi,


We are using MapProxy to cache our WMS server. Many of the layers are available in multiple styles and we wish to cache all available styles. For example the layer GDPS.ETA_TT is available in the following styles:

  *   ?TEMPERATURE-LINEAR
  *   ?TEMPSUMMER
  *   ?TEMPSUMMER-LINEAR
  *   ?TEMPWINTER?
  *   TEMPWINTER-LINEAR
  *   TEMPERATURE

When I make a request with the styles parameter blank I receive the expected image. However, whenever I add a style to the request I receive an error saying StyleNotDefined">unsupported styles: TEMPSUMMER.  A simplified version of the config I am using is below. A sample request with blank style parameter and a sample request with STYLE=TEMPSUMMER are also below.

How do I setup these styles in the config?

Thank you for your time,
Tom Cooney??

caches:
  GDPS.ETA_TT_cache:
    sources:
    - GDPS.ETA_TT_source
layers:
  name: GDPS.ETA_TT
  sources:
  - GDPS.ETA_TT_cache
sources:
  GDPS.ETA__TT_source:
    req:
      layers: GDPS.ETA_TT
      url: https ....
      styles: TEMPSUMMER

Request with blank styles parameter (returns the image as expected)
http://geomet-dev-03.cmc.ec.gc.ca:8000/service?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-90,-180,90,180&CRS=EPSG:4326&WIDTH=1351&HEIGHT=676&LAYERS=GDPS.ETA_TT&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE&TIME=2021-02-26T00:00:00Z

Request with a style (returns StyleNotDefined error)
http://geomet-dev-03.cmc.ec.gc.ca:8000/service?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-90,-180,90,180&CRS=EPSG:4326&WIDTH=1351&HEIGHT=676&LAYERS=GDPS.ETA_TT&STYLES=TEMPSUMMER&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=T


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20210301/1164baae/attachment.html>


More information about the MapProxy mailing list