[mapserver-users] How to assemble mapcache tilesets into a new layer?

jbo-ads at laposte.net jbo-ads at laposte.net
Thu Feb 13 11:49:12 PST 2020


Yes your configuration looks right. 

But IIRC, if you want to use that source, you actually need to define a tileset that references it. Something like: 

<cache name="D" type="sqlite3"> 
<dbfile>/path/to/cache/D.sqlite3</cache> 
</cache> 
<tileset name="D"> 
<source>D</source> 
<cache>D</cache> 
... 
</tileset> 

and use it as: http://localhost/mapcache?REQUEST=GetMap&LAYERS=D&.. . 

----- Mail original -----

De: "Stephen Woodbridge" <stephenwoodbridge37 at gmail.com> 
À: "jbo-ads" <jbo-ads at laposte.net>, mapserver-users at lists.osgeo.org 
Envoyé: Jeudi 13 Février 2020 20:33:02 
Objet: Re: [mapserver-users] How to assemble mapcache tilesets into a new layer? 

Ok to answer my own question, yes you need <http> section like this for 
assembly to work: 

<source name="D" type="wms"> 
<getmap> 
<params> 
<FORMAT>image/png></FORMAT> 
<LAYERS>A,B,C</LAYERS> 
</params> 
</getmap> 
<http> 
<url>http://localhost/mapcache</url> 
</http> 
</source> 

And you don't need a <tileset> defined for it to work as it reads data 
from the existing tilesets and assembles the new image. I suppose if you 
wanted you could also define a new tileset so it would cache the 
assembled images, but I'm not sure that that is needed except possibly 
in very high demand situations. But this is just my surmise. 

Thanks, 
-Steve 

On 2/13/2020 1:46 PM, Stephen Woodbridge wrote: 
> On 2/13/2020 12:36 PM, jbo-ads wrote: 
>> Hi Steve, 
>> 
>> Yes, this part of the doc should be improved... A more helpful one is 
>> <https://mapserver.org/mapcache/dimensions.html#tile-assembly-policies> 
>> but it is relative only to second level dimensions. 
>> 
>> Assembling several layers can be performed with a WMS request using 
>> "...&LAYERS=A,B,C&...". Then to create a new layer, you just need to 
>> define a WMS source using that WMS pattern. 
> Jérome, 
> 
> Thanks that seems simple enough. A couple of questions: 
> 
> <source name="D" type="wms"> 
> <getmap> 
> <params> 
> <FORMAT>image/png></FORMAT> 
> <LAYERS>A,B,C</LAYERS> 
> </params> 
> </getmap> 
> <http> 
> ????? 
> </http> 
> </source> 
> 
> <tileset name="D"> 
> <source>D</source> 
> ... 
> </tileset> 
> 
> Does this look right? 
> Should I have an <http> section and what should be in that if anything 
> for assembly of existing tilesets? 
> 
> Thanks, 
> -Steve 
>> 
>> Jérome. 
>> 
>> 
>> 
>> Le 13/02/2020 à 17:24, Stephen Woodbridge a écrit : 
>>> Hi all, 
>>> 
>>> I have three existing layers in my mapcache.xml and I need to create 
>>> a new layer that assembles this three layers into a single layer. 
>>> There is a section in the mapcache documentation 
>>> https://mapserver.org/mapcache/tile_assembling.html but it is not 
>>> very helpful ;) 
>>> 
>>> Can anyone help with with this problem? 
>>> 
>>> Say I have existing tilesets "A", "B", "C" how would I create a 
>>> tileset "D" where it stacks A, B, and C like: 
>>> 
>>> C 
>>> B 
>>> A 
>>> 
>>> Thanks, 
>>> -Steve W 
>>> _______________________________________________ 
>>> mapserver-users mailing list 
>>> mapserver-users at lists.osgeo.org 
>>> https://lists.osgeo.org/mailman/listinfo/mapserver-users 
>> 
>> _______________________________________________ 
>> mapserver-users mailing list 
>> mapserver-users at lists.osgeo.org 
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200213/82b943f3/attachment.html>


More information about the mapserver-users mailing list