[mapserver-users] MapCache Larger tiles, reduce number of files
Jean-Philippe Chenel
jp.chenel at LIVE.CA
Mon Mar 9 11:45:05 PDT 2020
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,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200309/9c7aff95/attachment.htm>
More information about the MapServer-users
mailing list