[MapProxy] MapProxy - WMS feed from MapProxy renders tiles with different scale when compared with OSM on MapServer

andrew kovacs andrewmrkovacs at gmail.com
Wed Sep 10 13:25:26 PDT 2014


Hi Oliver,



Thanks for your feedback.  The following is my yaml file:





services:

  demo:

  tms:

  wms:

    md:

        title: OSM for MapProxy



sources:

  MapServerCADRG:

    type: wms

    wms_opts:

      #requests the source with a specific version

      version: '1.3.0'

    req:

      url: http://**.***.***.213/mapcache/?

      layers: cadrg

      srs: 'EPSG:900913'

  MapServerOSM:

    type: wms

    wms_opts:

       #requests the source with a specific version

       version: '1.3.0'

    req:

      url: http://**.***.***.213/mapcache/?

      layers: osm

      #srs: 'EPSG:4326'

  gefusion_1:

      type: tile

      grid: gefusion_grid

      url: http://
**.***.***.14/default_map/query?request=ImageryMaps&channel=1006&version=17&x=%(x)s&y=%(y)s&z=%(z)s



caches:

  CADRG_cache:

    format: image/jpeg

    sources: [MapServerCADRG]

    grids: [GLOBAL_GEODETIC]

  OSM_cache_2:

    format: image/jpeg

    #image:

      #encoding_options:

        #jpeg_quality: 80

    sources: [MapServerOSM]

    grids: [WGS84]

    meta_size: [5,5]

    meta_buffer: 10

  Google_cache:

    format: image/jpeg

    sources: [gefusion_1]

    grids: [gefusion_grid]

   #   cache:

   # type: tc



layers:

  - name: CADRG

    title: CADRG

    sources: [CADRG_cache]

  - name: OSM

    title: Open Street Map

    sources: [OSM_cache_2]

  - name: Google

    title: Google Imagery

    sources: [Google_cache]



grids:

   WGS84:

     #base: GLOBAL_GEODETIC

     res:
[0.70312500000000000000,0.35156250000000000000,0.17578125000000000000,0.08789062500000000000,0.04394531250000000000,0.02197265625000000000,0.01098632812500000000,0.00549316406250000000,0.00274658203125000000,0.00137329101562500000,0.00068664550781250000,0.00034332275390625000,0.00017166137695312500,0.00008583068847656250,0.00004291534423828120,0.00002145767211914060,0.00001072883605957030,0.00000536441802978516]

     srs: EPSG:4326

     bbox: [-180.000000,-90.000000,180.000000,90.000000]

     bbox_srs: EPSG:4326

     #min_res: 0

     num_levels: 18

     #res_factor: sqrt2

     tile_size: [512,512]

   gefusion_grid:

     base: GLOBAL_MERCATOR

     srs: EPSG:4326

     bbox: [-20037508.3427892, -20037508.3427892, 20037508.3427892,
20037508.3427892]

     bbox_srs: EPSG:32662

     origin: nw



globals:

   cache:

     base_dir: './cache_data'

     lock_dir: './cache_data/tile_locks'



I am only focused on the OSM layer.



After running serve-develop, I can see there is a slight difference in the
requests when compared with the requests on the MapProxy gui itself. The
client is requesting CRS:84 from MapProxy where MapProxy is requesting
EPSG:4326.





MapProxy gui accessing OSM service (images show up clear as expected)



[2014-09-10 15:50:01,560] mapproxy.source.request - INFO - GET
http://**.***.***.213/mapcache/?styles=&format=image%2Fjpeg&height=2580&bbox=-33.9697265625,-67.7197265625,22.7197265625,-11.0302734375&layers=osm&crs=EPSG%3A4326&service=WMS&request=GetMap&width=2580&version=1.3.0
200 520.9 297

[2014-09-10 15:50:01,650] mapproxy.source.request - INFO - GET
http://**.***.***.213/mapcache/?styles=&format=image%2Fjpeg&height=2580&bbox=22.2802734375,-11.4697265625,78.9697265625,45.2197265625&layers=osm&crs=EPSG%3A4326&service=WMS&request=GetMap&width=2580&version=1.3.0
200 1268.9 391



Client accessing MapProxy (images appear off scale)



[info] **.***.***.106 - - [10/Sep/2014 15:50:02] "GET
/service/?service=WMS&request=GetMap&version=1.3.0&crs=CRS:84&layers=OSM&styles=&transparent=TRUE&format=image/jpeg&width=512&height=512&bbox=-36.0,18.0,-18.0,36.0
HTTP/1.1" 200 -

[info] **.***.***.106 - - [10/Sep/2014 15:50:02] "GET
/service/?service=WMS&request=GetMap&version=1.3.0&crs=CRS:84&layers=OSM&styles=&transparent=TRUE&format=image/jpeg&width=512&height=512&bbox=-18.0,36.0,0.0,54.0
HTTP/1.1" 200 -

[2014-09-10 15:50:02,360] mapproxy.source.request - INFO - GET
http://**.***.***.213/mapcache/?styles=&format=image%2Fjpeg&height=2580&bbox=-33.9697265625,-11.4697265625,22.7197265625,45.2197265625&layers=osm&crs=EPSG%3A4326&service=WMS&request=GetMap&width=2580&version=1.3.0
200 711.7 323

[info] **.***.***.106 - - [10/Sep/2014 15:50:02] "GET
/service/?service=WMS&request=GetMap&version=1.3.0&crs=CRS:84&layers=OSM&styles=&transparent=TRUE&format=image/jpeg&width=512&height=512&bbox=-18.0,18.0,0.0,36.0
HTTP/1.1" 200 –





I am accessing OSM data hosted on MapServer built with the following grid:



<grid name="WGS84">

   <metadata>

      <title>GoogleCRS84Quad</title>


<WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleCRS84Quad</WellKnownScaleSet>

   </metadata>

   <extent>-180 -90 180 90</extent>

   <srs>EPSG:4326</srs>

   <units>dd</units>

   <size>256 256</size>

   <resolutions>0.703125000000000 0.351562500000000 0.175781250000000
8.78906250000000e-2 4.39453125000000e-2 2.19726562500000e-2
1.09863281250000e-2 5.49316406250000e-3 2.74658203125000e-3
1.37329101562500e-3 6.86645507812500e-4 3.43322753906250e-4
1.71661376953125e-4 8.58306884765625e-5 4.29153442382812e-5
2.14576721191406e-5 1.07288360595703e-5 5.36441802978516e-6</resolutions>

</grid>



The resolutions I entered for my MapProxy grid were the ones I identified
from MapServer.  And again, I can point my client directly to MapServer and
the images are clear.  It is only when I access the service through
MapProxy that it appears off.  Not sure what I am missing, hopefully just a
change in the yaml file.



Thanks again,



Andrew



















On Tue, Sep 9, 2014 at 3:38 AM, Oliver Tonnhofer <olt at omniscale.de> wrote:

> Hi,
>
> On 08.09.2014, at 15:30, andrew kovacs wrote:
>
> > The client I am using is built off of the NASA WorldWind client app.
> Based off of some of the forums from NASA I can see some of the resolutions
> that are being requested:
> >
> > Level 0, Tile delta 36", 512 pixels, resolution 0.0703125 (=36/512)
> > Level 1, Tile delta 18", 512 pixels, resolution 0.0.03515625 (=18/512)
> > Level 2, Tile delta 9", 512 pixels, resolution 0.017578125 (=9/512)
> > Level 3, Tile delta 4.5", 512 pixels, resolution 0.08789063
> > Level 4, Tile delta 2.25", 512 pixels, resolution 0.04394531
> > Level 5, Tile delta 1.125", 512 pixels, resolution 0.02197266
> > Level 6, Tile delta 0.562", 512 pixels, resolution 0.001098633
> > Level 7, Tile delta 0.28125", 512 pixels, resolution 0.000549316
> > Level 8, Tile delta 0.140625", 512 pixels, resolution 0.000274658
> > Level 9, Tile delta 0.0703125", 512 pixels, resolution 0.000137329
> >
> >
> > I tried using the initial resolution and converted to metres using the
> mapproxy-util scales tool but the results did not prove anything useful.
>
> "convert to meters"? You need to have a cache in EPSG:4326 if the client
> requests EPSG:4326, otherwise the images will look fuzzy regardless of the
> configured resolution.
>
>
> > Also, I can see the config file that gets generated on my client side
> when accessing the WMS from MapProxy (I have attached it).  I also have
> attached the config file that gets generated when I access MapServer
> directly.
> >
> > From what I can see, the configurations are very similar but the "number
> of levels" are different.  Accessing MapServer gives me 20 levels (and the
> data looks correct) and MapProxy gives me 18 levels (and does not look
> correct).
> >
> > I attempted to force the grid to use 20 levels in MapProxy, but my
> understanding was 20 levels was the default anyways.  I also changed the
> file size to 512 and format to jpeg, but it didn't seem to change the
> appearance of the tiles.
> >
> > Any help going forward would be appreciated, I can provide more info if
> needed.
>
>
> Please provide your MapProxy configuration and some log output from
> `mapproxy-util serve-develop` (requests your client and MapProxy made).
>
>
> Regards,
> Oliver
>
> --
> Oliver Tonnhofer  | Omniscale GmbH & Co KG  | http://omniscale.com
> OpenStreetMap WMS and tile services         | http://maps.omniscale.com
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20140910/30242693/attachment-0001.html>


More information about the MapProxy mailing list