[MapProxy] Issue with specific resolutions/scales
Jeremy Holt
jholt at adc4gis.com
Thu May 14 09:16:01 PDT 2015
Thanks Oliver,
I've checked into it a bit, and I'm still curious as to how I can get
mapproxy to accommodate. I have found that the Openlayers request
parameters work when directly passed to the wms server, so I would assume
that mapproxy would be able to handle that same request with success.
Here are examples of a tile request at resolution 9.375/scale
1:10800/EPSG:103413
Direct to ArcGIS Server WMS(works)
http://ags1.wgxtreme.com/arcgis/services/DodgeCoWi/DodgeCoWiMain/MapServer/WMSServer?SRS=EPSG%3A103413&LAYERS=3&FORMAT=image%2Fjpeg&TILED=true&TILESORIGIN=771292.20391%2C617600.31082&WIDTH=256&HEIGHT=256&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=888892.20391,706400.31082,891292.20391,708800.31082
To MP (fails)
http://mp3.adc4gis.com/dodgecowi/service?SRS=EPSG%3A103413&LAYERS=dodgecowi_aerial2012_layer&FORMAT=image%2Fjpeg&TILED=true&TILESORIGIN=771292.20391%2C617600.31082&WIDTH=256&HEIGHT=256&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=888892.20391,706400.31082,891292.20391,708800.31082
<ServiceException>Request too large or invalid BBOX.</ServiceException>
How can I adjust my mapproxy config to work with the BBOX generated at
those resolutions if it's currently working as expected for the other
resolutions?
Thanks again!
On Wed, May 13, 2015 at 4:03 AM, Oliver Tonnhofer <olt at omniscale.de> wrote:
> Hi Jeremy,
>
> your OpenLayers has a slightly different tile grid configuration then
> MapProxy. The resolution is right, but the BBOX is not aligned to the
> actual cached tile.
>
>
> Regards,
> Oliver
>
> --
> Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
> OpenStreetMap WMS and tile services | http://maps.omniscale.com
>
>
>
> > On 11.05.2015, at 20:09, Jeremy Holt <jholt at adc4gis.com> wrote:
> >
> > Hello! Thanks in advance for taking a peek at this!
> >
> > 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.
> >
> > Basically, I have resolutions defined in a grid that do not seem
> supported for tile creation/requests.
> >
> > Using Mapproxy 1.7 on Ubuntu servers.
> >
> > 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.
> > 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.
> >
> >
> > The following is a list of the resolutions defined in the Grid:
> >
> > [
> > 390.62500000000006,
> > 303.8194444444444,
> > 217.013888888888,
> > 104.16666666666666,
> > 52.08333333333333,
> > 41.666666666666664,
> > 20.833333333333332,
> > 10.416666666666666,
> > 9.375, (1:10,800 - this is a problem scale)
> > 8.333333333333334, (1:9600 - this is a problem scale)
> > 7.291666666666666, (1:8400 - this is a problem scale)
> > 6.250000000000001,
> > 5.208333333333333,
> > 4.166666666666667,
> > 2.0833333333333335,
> > 1.0416666666666667,
> > 0.5208333333333334
> > ]
> >
> > Here is an example request that FAILS (1:10800 , res 9.375):
> >
> 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
> >
> > Here is a request that WORKS for the scale above (1:12000 , res
> 10.416666666666666):
> >
> 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
> >
> >
> > Here is the 'mapproxy.yaml' for review:
> >
> > services:
> > demo:
> > kml:
> > tms:
> > # needs no arguments
> > # wmts:
> > wms:
> > 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']
> > image_formats: ['image/jpeg', 'image/png32', 'image/png' ]
> > md:
> > # metadata used in capabilities documents
> > title: MapProxy WMS Proxy
> > abstract: This is the pretty great MapProxy.
> > online_resource: http://mapproxy.org/
> > contact:
> > person: Jeremy Holt
> > position: GIS Consultant
> > organization: ADC
> > address:
> > city: EC
> > postcode:
> > country: USA
> > phone:
> > fax:
> > email:
> > access_constraints:
> > This service is intended for private and evaluation use only.
> > The data is licensed as Creative Commons Attribution-Share Alike
> 2.0
> > (http://creativecommons.org/licenses/by-sa/2.0/)
> > fees: 'None'
> > layers:
> > #dodgecowi
> > - name: dodgecowi_hillshade_layer
> > title: Dodge County, WI Main Tab
> > sources: [dodgecowi_hillshade]
> > - name: dodgecowi_aerial2006_layer
> > title: Dodge County, WI Main Tab
> > sources: [dodgecowi_aerial2006]
> > - name: dodgecowi_aerial1999_layer
> > title: Dodge County, WI Main Tab
> > sources: [dodgecowi_aerial1999]
> > - name: dodgecowi_aerial2012_layer
> > title: Dodge County, WI Main Tab
> > sources: [dodgecowi_aerial2012]
> > caches:
> > #dodgecowi
> > dodgecowi_hillshade:
> > grids: [dodgecowi_grid]
> > sources: [dodgecowi_hillshade_wms]
> > format: image/jpeg
> > dodgecowi_aerial2006:
> > grids: [dodgecowi_grid]
> > sources: [dodgecowi_aerial2006_wms]
> > format: image/jpeg
> > dodgecowi_aerial1999:
> > grids: [dodgecowi_grid]
> > sources: [dodgecowi_aerial1999_wms]
> > format: image/jpeg
> > dodgecowi_aerial2012:
> > grids: [dodgecowi_grid]
> > sources: [dodgecowi_aerial2012_wms]
> > format: image/jpeg
> > sources:
> > #dodgecowi:
> > dodgecowi_hillshade_wms:
> > type: wms
> > req:
> > url:
> http://ags1.wgxtreme.com/ArcGIS/services/DodgeCoWi/DodgeCoWIMain/MapServer/WMSServer
> ?
> > layers: 0
> > supported_srs: ['EPSG:4326', 'EPSG:103413']
> > supported_formats: ['image/jpeg']
> > format: image/jpeg
> > dodgecowi_aerial2006_wms:
> > type: wms
> > req:
> > url:
> http://ags1.wgxtreme.com/ArcGIS/services/DodgeCoWi/DodgeCoWIMain/MapServer/WMSServer
> ?
> > layers: 1
> > supported_srs: ['EPSG:4326', 'EPSG:103413']
> > supported_formats: ['image/jpeg']
> > format: image/jpeg
> > dodgecowi_aerial1999_wms:
> > type: wms
> > req:
> > url:
> http://ags1.wgxtreme.com/ArcGIS/services/DodgeCoWi/DodgeCoWIMain/MapServer/WMSServer
> ?
> > layers: 2
> > supported_srs: ['EPSG:4326', 'EPSG:103413']
> > supported_formats: ['image/jpeg']
> > format: image/jpeg
> > dodgecowi_aerial2012_wms:
> > type: wms
> > req:
> > url:
> http://ags1.wgxtreme.com/ArcGIS/services/DodgeCoWi/DodgeCoWIMain/MapServer/WMSServer
> ?
> > layers: 3
> > supported_srs: ['EPSG:4326', 'EPSG:103413']
> > supported_formats: ['image/jpeg']
> > format: image/jpeg
> > grids:
> > dodgecowi_grid:
> > srs: 'EPSG:103413'
> > tile_size: [256, 256]
> > bbox:
> [771292.20390976,617600.31082016,992212.34279864,799240.93582016]
> > 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]
> > 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'
> >
> > srs:
> > proj_data_dir: '../srs'
> >
> > # # cache options
> > cache:
> > # where to store the cached images
> > base_dir: '/mnt/cache'
> > # where to store lockfiles
> > lock_dir: '/tmp/tile_locks'
> > # # request x*y tiles in one step
> > meta_size: [6, 6]
> > # # add a buffer on all sides (in pixel) when requesting
> > # # new images
> > meta_buffer: 256
> >
> >
> > # 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
> >
> >
> >
> > --
> > Jeremy Holt
> > GIS Consultant
> > Applied Data Consultants, Inc.
> > www.adc4gis.com
> > 715-874-4397 ext. 243
> > <mapproxy_error.txt>_______________________________________________
> > MapProxy mailing list
> > MapProxy at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapproxy
>
>
--
Jeremy Holt
GIS Consultant
Applied Data Consultants, Inc.
www.adc4gis.com
715-874-4397 ext. 243
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20150514/b0e41f7a/attachment-0001.html>
More information about the MapProxy
mailing list