[MapProxy] 512x512 tile service from 256x256 tile source

Radim Blazek radim.blazek at gmail.com
Thu Sep 1 08:24:23 PDT 2016


Using cache as source of another cache with different tile size works! I.e.:

caches:
  osm_cache:
    grids: [webmercator]
    sources: [osm_source]

  osm_cache_512:
    grids: [webmercator_512]
    sources: [osm_cache]


Great, thanks.

Radim

On Thu, Sep 1, 2016 at 3:58 PM,  <pavlicek.david at gmail.com> wrote:
> Hi Radim,
>
> I think this is not possible. I quickly look at the source code
> (https://github.com/mapproxy/mapproxy/blob/7ade9e1af398e5408bb6f5af132755e63aeec9dc/mapproxy/source/tile.py#L45
> )and there is only check if requested and source tile sizes are equal. If
> not, exception is raised. So there is no logic for stitching smaller tiles
> to larger one.
>
>
>
> Maybe you should try to use 2 caches. One cache with standard (small) tiles
> and one with large tiles. Then you can try to use small tile cache as source
> for large tile cache. I don’t try this, its just quick idea…
>
>
>
> David
>
>
>
> Odesláno z aplikace Pošta pro Windows 10
>
>
>
> Od: Radim Blazek
> Odesláno:čtvrtek 1. září 2016 13:54
> Komu: mapproxy at lists.osgeo.org
> Předmět: [MapProxy] 512x512 tile service from 256x256 tile source
>
>
>
> I would like to get 512x512 tiles from a source which has 256x256
>
> tiles, here is my config:
>
>
>
> ------------------------------------------------------------------------------------------------------------------------
>
> services:
>
>   tms:
>
>     use_grid_names: true
>
>     srs: ['EPSG:3857']
>
>
>
> layers:
>
>   - name: osm
>
>     title: OSM
>
>     sources: [osm_cache]
>
>
>
> caches:
>
>   osm_cache:
>
>     grids: [webmercator_512]
>
>     sources: [osm_source]
>
>
>
> sources:
>
>   osm_source:
>
>     type: tile
>
>     grid: webmercator
>
>     url: http://tile.openstreetmap.org/%(z)s/%(x)s/%(y)s.png
>
>
>
> grids:
>
>     webmercator:
>
>       base: GLOBAL_WEBMERCATOR
>
>
>
>     webmercator_512:
>
>       base: GLOBAL_WEBMERCATOR
>
>       tile_size: [512, 512]
>
>       res: [78271.516964, 39135.758482, 19567.879241, 9783.9396205 ]
>
> ------------------------------------------------------------------------------------------------------------------------
>
>
>
> But this request: /tiles/osm/webmercator_512/0/0/0.png returns: "tile
>
> size of cache and tile source do not match: (256, 256) != (512, 512)"
>
>
>
> Making 512x512 tile service from WMS source or higher resolution WMS
>
> service from 256x256 tile source both work.
>
>
>
> So what is the trick to get 512x512 tiles?
>
>
>
> Radim
>
> _______________________________________________
>
> MapProxy mailing list
>
> MapProxy at lists.osgeo.org
>
> http://lists.osgeo.org/mailman/listinfo/mapproxy
>
>


More information about the MapProxy mailing list