globals:
  cache:
    base_dir: /tmp/cache_data/
    meta_size: [1, 1]
    meta_buffer: 0
  image:
    paletted: False
    # resampling: 'bicubic'

services:
  wms:

layers:
  - name: combinable
    title: Uncached combined layers
    sources: [wms1, wms3, wms4, wms2]
  - name: uncombinable
    title: Uncached layers
    sources: [wms1, wms2, wms3]
  - name: single
    title: Uncached combined layers
    sources: [wms4]
  - name: cached
    title: Cached combined layers
    sources: [wms_cache]

  - name: opacity_base
    title: opacity test base layer
    sources: [wms_opacity1]
  - name: opacity_overlay
    title: opacity test overlay layer
    sources: [wms_opacity2]

  - name: layer_image_opts1
    title: layer with transparent_color
    sources: [wms_iopts1]
  - name: layer_image_opts2
    title: layer with transparent_color
    sources: [wms_iopts2]

  - name: layer_fwdparams1
    title: Uncached layer with fwdparams 1
    sources: [wms_fwdparams1, wms_fwdparams2]
  - name: layer_fwdparams2
    title: Uncached layer with fwdparams 2
    sources: [wms_fwdparams3]

caches:
  wms_cache:
    grids: [GLOBAL_MERCATOR]
    sources: [wms1, wms3, wms2]

sources:
  wms1:
    type: wms
    req:
      url: http://localhost:42423/service_a
      layers: a_one
      transparent: True
  wms2:
    type: wms
    req:
      url: http://localhost:42423/service_b
      layers: b_one
      transparent: True
  wms3:
    type: wms
    req:
      url: http://localhost:42423/service_a
      layers: a_two,a_three
      transparent: True
  wms4:
    type: wms
    req:
      url: http://localhost:42423/service_a
      layers: a_four
      transparent: True
  
  wms_opacity1:
    type: wms
    req:
      url: http://localhost:42423/service_a
      layers: a_one
  wms_opacity2:
    type: wms
    image:
      opacity: 0.5
    req:
      url: http://localhost:42423/service_a
      layers: a_two

  wms_iopts1:
    type: wms
    image:
      transparent_color: [255, 0, 0]
    req:
      url: http://localhost:42423/service_a
      layers: a_iopts_one
      transparent: True
  
  wms_iopts2:
    type: wms
    image:
      transparent_color: [255, 0, 0]
    req:
      url: http://localhost:42423/service_a
      layers: a_iopts_two
      transparent: True

  wms_fwdparams1:
    type: wms
    forward_req_params: ['time']
    req:
      url: http://localhost:42423/service_a
      layers: a_one
      transparent: True
  wms_fwdparams2:
    type: wms
    forward_req_params: ['time', 'vendor']
    req:
      url: http://localhost:42423/service_a
      layers: a_two
      transparent: True
  wms_fwdparams3:
    type: wms
    forward_req_params: ['time', 'vendor']
    req:
      url: http://localhost:42423/service_a
      layers: a_three,a_four
      transparent: True
