<div dir="ltr">Hello! Thanks in advance for taking a peek at this!<div><br><div>I've been utilizing mapproxy for a number of services and various coordinate systems, and this is the first issue I've had that seems related.</div><div><br></div><div>Basically, I have resolutions defined in a grid that do not seem supported for tile creation/requests. </div><div><br></div><div>Using Mapproxy 1.7 on Ubuntu servers.</div><div><br></div><div>I have 17 res levels defined in the grid, and 3 of them return service errors when a BBOX is passed in the request. The rest are just fine.</div><div>In my application, mapproxy is used to create tiles via WMS reuqests to ArcGIS Server, and return those created imagery tiles via WMS consumed in OpenLayers. Scale levels and resolutions coordinate in that respect. This example uses a county coordinate system (EPSG:103413, Feet, defined in SRS) and seems to have no problem with the majority of requests. I have attached the output of a logging service with a stack trace when the failing requests are made. I'm wondering if there is a factor related to the Grid that is perhaps missing to support these resolutions, or if there is something else I can do to get successful requests at specific resolutions. I'll be more than happy to provide further information. </div><div><br></div><div><br></div><div>The following is a list of the resolutions defined in the Grid:</div><div><br></div><div><div>[</div><div>   390.62500000000006,</div><div>   303.8194444444444,</div><div>   217.013888888888,</div><div>   104.16666666666666,</div><div>   52.08333333333333,</div><div>   41.666666666666664,</div><div>   20.833333333333332,</div><div>   10.416666666666666,</div><div><b>   9.375, (1:10,800 - this is a problem scale)</b></div><div><b>   8.333333333333334, (1:9600 - this is a problem scale)</b></div><div><b>   7.291666666666666, (1:8400 - this is a problem scale)</b></div><div>   6.250000000000001,</div><div>   5.208333333333333,</div><div>   4.166666666666667,</div><div>   2.0833333333333335,</div><div>   1.0416666666666667,</div><div>   0.5208333333333334</div><div>]</div></div><div><br></div><div>Here is an example request that FAILS (1:10800 , res 9.375):</div><div><span style="color:rgb(48,57,66);font-family:'dejavu sans mono',monospace;font-size:11px;white-space:pre-wrap"><a href="http://mp4.adc4gis.com/dodgecowi/service?SRS=EPSG%3A103413&LAYERS=dodgecowi_aerial2012_layer&FORMAT=image%2Fjpeg&TILED=true&TILESORIGIN=771292.20390976%2C617600.31082016&WIDTH=256&HEIGHT=256&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=874492.20390976,701600.31082016,876892.20390976,704000.31082016">http://mp4.adc4gis.com/dodgecowi/service?SRS=EPSG%3A103413&LAYERS=dodgecowi_aerial2012_layer&FORMAT=image%2Fjpeg&TILED=true&TILESORIGIN=771292.20390976%2C617600.31082016&WIDTH=256&HEIGHT=256&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=874492.20390976,701600.31082016,876892.20390976,704000.31082016</a></span><br></div><div><br></div>Here is a request that WORKS for the scale above (1:12000 , res 10.416666666666666):<div><span style="color:rgb(48,57,66);font-family:'dejavu sans mono',monospace;font-size:11px;white-space:pre-wrap"><a href="http://mp4.adc4gis.com/dodgecowi/service?SRS=EPSG%3A103413&LAYERS=dodgecowi_aerial2012_layer&FORMAT=image%2Fjpeg&TILED=true&TILESORIGIN=771292.20390976%2C617600.31082016&WIDTH=256&HEIGHT=256&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=888625.53724309,702933.64415349,891292.20390976,705600.31082016">http://mp4.adc4gis.com/dodgecowi/service?SRS=EPSG%3A103413&LAYERS=dodgecowi_aerial2012_layer&FORMAT=image%2Fjpeg&TILED=true&TILESORIGIN=771292.20390976%2C617600.31082016&WIDTH=256&HEIGHT=256&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=888625.53724309,702933.64415349,891292.20390976,705600.31082016</a></span><font color="#303942" face="dejavu sans mono, monospace"><span style="font-size:11px;white-space:pre-wrap"><br></span></font></div><div><br></div><div><br></div><div>Here is the 'mapproxy.yaml' for review:<br></div><div><br></div><div><div>services:</div><div>  demo:</div><div>  kml:</div><div>  tms:</div><div>    # needs no arguments</div><div> # wmts:</div><div>  wms:</div><div>    srs: ['EPSG:4326', 'EPSG:900913','EPSG:103405', 'EPSG:4258','EPSG:31466', 'EPSG:31467', 'EPSG:31468', 'EPSG:25831', 'EPSG:25832', 'EPSG:25833', 'EPSG:103930', 'EPSG:26914', 'EPSG:103901', 'EPSG:103902', 'EPSG:103426', 'EPSG:96922', 'EPSG:103450', 'EPSG:103441', 'EPSG:0', 'EPSG:103950', 'EPSG:103456', 'EPSG:103456', 'EPSG:103444', 'EPSG:103969', 'EPSG:103408', 'EPSG:32054', 'EPSG:103459', 'EPSG:3070', 'EPSG:103454', 'EPSG:102100', 'EPSG:103407', 'EPSG:103460', 'EPSG:103413', 'EPSG:103409', 'EPSG:102704', 'EPSG:103406', 'EPSG:103446', 'EPSG:103433', 'EPSG:103411', 'EPSG:103409']</div><div>    image_formats: ['image/jpeg', 'image/png32',  'image/png' ]</div><div>    md:</div><div>      # metadata used in capabilities documents</div><div>      title: MapProxy WMS Proxy</div><div>      abstract: This is the pretty great MapProxy.</div><div>      online_resource: <a href="http://mapproxy.org/">http://mapproxy.org/</a></div><div>      contact:</div><div>        person: Jeremy Holt</div><div>        position: GIS Consultant</div><div>        organization: ADC</div><div>        address:</div><div>        city: EC</div><div>        postcode:</div><div>        country: USA</div><div>        phone:</div><div>        fax:</div><div>        email:</div><div>      access_constraints:</div><div>        This service is intended for private and evaluation use only.</div><div>        The data is licensed as Creative Commons Attribution-Share Alike 2.0</div><div>        (<a href="http://creativecommons.org/licenses/by-sa/2.0/">http://creativecommons.org/licenses/by-sa/2.0/</a>)</div><div>      fees: 'None'</div><div>layers:</div><div>   #dodgecowi</div><div>  - name: dodgecowi_hillshade_layer</div><div>    title: Dodge County, WI Main Tab</div><div>    sources: [dodgecowi_hillshade]</div><div>  - name: dodgecowi_aerial2006_layer</div><div>    title: Dodge County, WI Main Tab</div><div>    sources: [dodgecowi_aerial2006]</div><div>  - name: dodgecowi_aerial1999_layer</div><div>    title: Dodge County, WI Main Tab</div><div>    sources: [dodgecowi_aerial1999]</div><div>  - name: dodgecowi_aerial2012_layer</div><div>    title: Dodge County, WI Main Tab</div><div>    sources: [dodgecowi_aerial2012]</div><div>caches:</div><div>#dodgecowi</div><div>  dodgecowi_hillshade:</div><div>    grids: [dodgecowi_grid]</div><div>    sources: [dodgecowi_hillshade_wms]</div><div>    format: image/jpeg</div><div>  dodgecowi_aerial2006:</div><div>    grids: [dodgecowi_grid]</div><div>    sources: [dodgecowi_aerial2006_wms]</div><div>    format: image/jpeg</div><div>  dodgecowi_aerial1999:</div><div>    grids: [dodgecowi_grid]</div><div>    sources: [dodgecowi_aerial1999_wms]</div><div>    format: image/jpeg</div><div>  dodgecowi_aerial2012:</div><div>    grids: [dodgecowi_grid]</div><div>    sources: [dodgecowi_aerial2012_wms]</div><div>    format: image/jpeg</div><div>sources:</div><div>#dodgecowi:</div><div>  dodgecowi_hillshade_wms:</div><div>    type: wms</div><div>    req:</div><div>      url: <a href="http://ags1.wgxtreme.com/ArcGIS/services/DodgeCoWi/DodgeCoWIMain/MapServer/WMSServer">http://ags1.wgxtreme.com/ArcGIS/services/DodgeCoWi/DodgeCoWIMain/MapServer/WMSServer</a>?</div><div>      layers: 0</div><div>      supported_srs: ['EPSG:4326', 'EPSG:103413']</div><div>      supported_formats: ['image/jpeg']</div><div>      format: image/jpeg</div><div>  dodgecowi_aerial2006_wms:</div><div>    type: wms</div><div>    req:</div><div>      url: <a href="http://ags1.wgxtreme.com/ArcGIS/services/DodgeCoWi/DodgeCoWIMain/MapServer/WMSServer">http://ags1.wgxtreme.com/ArcGIS/services/DodgeCoWi/DodgeCoWIMain/MapServer/WMSServer</a>?</div><div>      layers: 1</div><div>      supported_srs: ['EPSG:4326', 'EPSG:103413']</div><div>      supported_formats: ['image/jpeg']</div><div>      format: image/jpeg</div><div>  dodgecowi_aerial1999_wms:</div><div>    type: wms</div><div>    req:</div><div>      url: <a href="http://ags1.wgxtreme.com/ArcGIS/services/DodgeCoWi/DodgeCoWIMain/MapServer/WMSServer">http://ags1.wgxtreme.com/ArcGIS/services/DodgeCoWi/DodgeCoWIMain/MapServer/WMSServer</a>?</div><div>      layers: 2</div><div>      supported_srs: ['EPSG:4326', 'EPSG:103413']</div><div>      supported_formats: ['image/jpeg']</div><div>      format: image/jpeg</div><div>  dodgecowi_aerial2012_wms:</div><div>    type: wms</div><div>    req:</div><div>      url: <a href="http://ags1.wgxtreme.com/ArcGIS/services/DodgeCoWi/DodgeCoWIMain/MapServer/WMSServer">http://ags1.wgxtreme.com/ArcGIS/services/DodgeCoWi/DodgeCoWIMain/MapServer/WMSServer</a>?</div><div>      layers: 3</div><div>      supported_srs: ['EPSG:4326', 'EPSG:103413']</div><div>      supported_formats: ['image/jpeg']</div><div>      format: image/jpeg</div><div>grids:</div><div>  dodgecowi_grid:</div><div>    srs: 'EPSG:103413'</div><div>    tile_size: [256, 256]</div><div>    bbox: [771292.20390976,617600.31082016,992212.34279864,799240.93582016]</div><div>    res: [564.2361111111111,477.4305555555556,390.62500000000006,303.8194444444444,217.013888888888,104.16666666666666,52.08333333333333,41.666666666666664,20.833333333333332,10.416666666666666,9.375,8.333333333333334,7.291666666666666,6.250000000000001,5.208333333333333,4.166666666666667,2.0833333333333335,1.0416666666666667,0.86805555555556,0.7812500000000001,0.6944444444444444,0.6076388888888888,0.5208333333333334,0.43402777777778,0.3472222222222222,0.2604166666666667,0.17361111111111,0.08680555555555555,0.043402777777777776]</div><div>globals:</div><div>  # # coordinate transformation options</div><div>  # srs:</div><div>  #   # WMS 1.3.0 requires all coordiates in the correct axis order,</div><div>  #   # i.e. lon/lat or lat/lon. Use the following settings to</div><div>  #   # explicitly set a CRS to either North/East or East/North</div><div>  #   # ordering.</div><div>  #   axis_order_ne: ['EPSG:9999', 'EPSG:9998']</div><div>  #   axis_order_en: ['EPSG:0000', 'EPSG:0001']</div><div>  #   # you can set the proj4 data dir here, if you need custom</div><div>  #   # epsg definitions. the path must contain a file named 'epsg'</div><div>  #   # the format of the file is:</div><div>  #   # <4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  <></div><div>  #   proj_data_dir: '/path to dir that contains epsg file'</div><div><br></div><div>  srs:</div><div>    proj_data_dir: '../srs'</div><div><br></div><div>  # # cache options</div><div>  cache:</div><div>    # where to store the cached images</div><div>    base_dir: '/mnt/cache'</div><div>    # where to store lockfiles</div><div>    lock_dir: '/tmp/tile_locks'</div><div>  #   # request x*y tiles in one step</div><div>    meta_size: [6, 6]</div><div>  #   # add a buffer on all sides (in pixel) when requesting</div><div>  #   # new images</div><div>    meta_buffer: 256</div><div><br></div><div><br></div><div>  # image/transformation options</div><div>  image:</div><div>      # resampling_method: nearest</div><div>      # resampling_method: bilinear</div><div>      resampling_method: bicubic</div><div>      jpeg_quality: 90</div><div>  #     # stretch cached images by this factor before</div><div>  #     # using the next level</div><div>      stretch_factor: 1.15</div><div>  #     # shrink cached images up to this factor before</div><div>  #     # returning an empty image (for the first level)</div><div>      max_shrink_factor: 4.0</div></div><div><br></div><div><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Jeremy Holt<br>GIS Consultant<br>Applied Data Consultants, Inc.<br><a href="http://www.adc4gis.com" target="_blank">www.adc4gis.com</a><br>715-874-4397 ext. 243<br></div>
</div></div></div>