[MapProxy] limiting image width and height in WMS requests?

Christian Willmes c.willmes at uni-koeln.de
Wed Mar 16 10:59:12 EDT 2011


On 16.03.2011 15:31, Oliver Tonnhofer wrote:

> 
> The size depends on your tile size, meta size and meta buffer. 1184 is 256x4+2x80, but the 2478 is odd. Is that your complete configuration?
> 

No it isn't the complete configuration, the complete mapproxy.yaml is
attached.

Meanwhile I found out, that the AGS is limiting the request width to
2048 pixel, could you maybe explain how I would configure the meta_size
and meta_buffer to meet that requirement?

Thanks and regards,
Christian

-- 
Christian Willmes
AG GIS & Fernerkundung      | GIS & RS Group
Geographisches Institut     | Institute of Geography
Universität zu Köln         | University of Cologne
Tel.: +49 (0)221 470 6234
Fax.: +49 (0)221 470 2280
http://www.geographie.uni-koeln.de/gis
http://www.sfb806.de
-------------- next part --------------
services:
  demo:
  kml:
  tms:
    # needs no arguments
  wms:
    srs: ['EPSG:4326', 'EPSG:900913']
    image_formats: ['image/jpeg', 'image/png']
    md:
      # metadata used in capabilities documents
      title: MapProxy WMS Proxy
      abstract: This is the fantastic MapProxy.
      online_resource: http://mapproxy.org/
      contact:
        person: Christian Willmes
      access_constraints:
        MapProx Test
      fees: 'None'

layers:
  osm:
    title: Omniscale OSM WMS - osm.omniscale.net
    sources: [osm_cache]

  OSMTiles:
    title: OpenStreetMap Tiles
    sources: [OSMTiles_cache]
    
  AGSBasemap:
    title: AGS Basemap
    sources: [AGSBasemapCache]

caches:
  osm_cache:
    grids: [GLOBAL_MERCATOR, global_geodetic_sqrt2]
    sources: [osm_wms]

  OSMTiles_cache:
    grid: global_mercator_osm
    sources: [osm_tiles]

  AGSBasemapCache:
    sources: [AGSBASE]

sources:
  osm_wms:
    type: wms
    req:
      url: http://osm.omniscale.net/proxy/service?
      layers: osm

  osm_tiles:
    type: tile
    url: http://a.tile.openstreetmap.org/%(tms_path)s.png
    origin: nw

  AGSBASE:
    type: wms
    wms_opts:
      version: 1.3.0
      featureinfo: true
      legendgraphic: true
    supported_srs: ['EPSG:4326']
    req:
      url: http://134.95.150.250:8399/arcgis/services/online/mapserver/wmsserver?
      layers: 0,1,2,3,4,5,6,7,8,9,10,11

grids:
  global_geodetic_sqrt2:
    base: GLOBAL_GEODETIC
    res_factor: 'sqrt2'
  global_mercator_osm:
    base: GLOBAL_MERCATOR
    num_levels: 18

globals:
  # # coordinate transformation options
  # srs:
  #   # WMS 1.3.0 requires all coordiates in the correct axis order,
  #   # i.e. lon/lat or lat/lon. Use the following settings to
  #   # explicitly set a CRS to either North/East or East/North
  #   # ordering.
  #   axis_order_ne: ['EPSG:9999', 'EPSG:9998']
  #   axis_order_en: ['EPSG:0000', 'EPSG:0001']
  #   # you can set the proj4 data dir here, if you need custom
  #   # epsg definitions. the path must contain a file named 'epsg'
  #   # the format of the file is:
  #   # <4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  <>
  #   proj_data_dir: '/path to dir that contains epsg file'

  # # cache options
  # cache:
  #   # where to store the cached images
  #   base_dir: '../var/cache_data'
  #   # where to store lockfiles
  #   lock_dir: '../tmp/tile_locks'
  #   # request x*y tiles in one step
  #   meta_size: [4, 4]
  #   # add a buffer on all sides (in pixel) when requesting
  #   # new images
  #   meta_buffer: 80


  # image/transformation options
  image:
      resampling_method: nearest
      # resampling_method: bilinear
      # resampling_method: bicubic
  #     jpeg_quality: 90
  #     # stretch cached images by this factor before
  #     # using the next level
  #     stretch_factor: 1.15
  #     # shrink cached images up to this factor before
  #     # returning an empty image (for the first level)
  #     max_shrink_factor: 4.0


More information about the MapProxy mailing list