[mapserver-users] MapCache Larger tiles, reduce number of files

Stephen Woodbridge stephenwoodbridge37 at gmail.com
Mon Mar 9 11:56:28 PDT 2020


Jean-Philippe,

I don't think it works like that. Resolution is determined by zoom 
factor so you generate  metatile at that resolution then you chop that 
metatile in tiles of whatever size you specify. So resolution is 
controled by zoom not tile size.

-Steve W

On 3/9/2020 2:45 PM, Jean-Philippe Chenel wrote:
> Hi,
>
> With MapCache, I want to generate the tiles that will be copied to a 
> mobile device, on a viewer created with OpenLayers.
>
> When generating a large extent, with multiple levels of zoom, the 
> files count is really big, so I want to reduce the number of files by 
> increasing the tile size. I've made a test with tiles 512x512, but 
> I've realized that the resolution must be changed when changing tiles 
> size. So, the tiles are bigger, but changing the resolution make 
> generating the same number of files.
>
> I'm open for workaround and other tricks.
>
> mapcache.xml
>
> <grid name="GoogleMaps512">
> <metadata>
> <title>GoogleMaps512</title>
> </metadata>
> <extent>-20037508.3427892480 -20037508.3427892480 20037508.3427892480 
> 20037508.3427892480</extent>
> <srs>EPSG:3857</srs>
> <srsalias>EPSG:900913</srsalias>
> <units>m</units>
> <size>512 512</size>
> <resolutions>156543.0339280410 78271.51696402048 39135.75848201023 
> 19567.87924100512 9783.939620502561 4891.969810251280 
> 2445.984905125640 1222.992452562820 611.4962262814100 
> 305.7481131407048 152.8740565703525 76.43702828517624 
> 38.21851414258813 19.10925707129406 9.554628535647032 
> 4.777314267823516 2.388657133911758 1.194328566955879 
> 0.5971642834779395</resolutions>
> </grid>
>
> <cache name="tmpl_xyz" type="disk" layout="template">
> <template>/data/mapcache/tiles/{tileset}/{grid}/{z}/{x}/{y}.{ext}</template>
> </cache>
>
> <tileset name="OpenStreetMap">
> <source>vmap0</source>
> <cache>tmpl_xyz</cache>
> <grid>GoogleMaps512</grid>
> <format>PNG</format>
> </tileset>
>
> With best regards,
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list