[MapProxy] Caching styles

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Mon Mar 1 08:00:14 PST 2021


Hi,

The GetMap request looks correct to me. Does it give an error also if you send it with a browser? If it does, and if that style is really advertised for that layer in the GetCapabilities then it feels like a server side issue.

-Jukka Rahkonen-

Lähettäjä: MapProxy <mapproxy-bounces at lists.osgeo.org> Puolesta Cooney, Tom (EC)
Lähetetty: maanantai 1. maaliskuuta 2021 16.59
Vastaanottaja: mapproxy at lists.osgeo.org
Aihe: [MapProxy] Caching styles


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/775b1875/attachment-0001.html>


More information about the MapProxy mailing list