Merge several layers into a single multi-layer GetMap request

J. Parapar listario at GMAIL.COM
Thu Nov 3 09:25:24 PST 2005


Hi Assefa, thanks for your time.

Looking at mapwmslayer.c, at the lines following those, it seems that
the parameters which are allowed to be different between the two
requests are LAYERS, QUERY_LAYERS and STYLES. The SLD_BODY parameter
is different in each request so the layers are not merged.

May I post a bug on this in http://mapserver.gis.umn.edu/bugs/?

Thanks again,
Jorge


2005/11/3, Yewondwossen Assefa <assefa at dmsolutions.ca>:
> Hi There,
>
>   I am nopt sure why would this happen. Cheking the code, the criteria
> for merging is the following (mapwmlalayer.c around line 927) :
>
>    if (!bForceSeparateRequest &&
>          lastconnectiontype == MS_WMS &&
>          psLastWMSParams != NULL &&
>          sThisWMSParams.numparams == psLastWMSParams->numparams &&
>          strcmp(sThisWMSParams.onlineresource,
>                 psLastWMSParams->onlineresource) == 0)
>
>     which translates into :
>
>        - no metadata set force_separate_request
>        - number of parameters are the same between 2 requests
> (parameters being all the manadatory and non manadory request parameters)
>        - the onlineresource should be the same.
>
>   Adding a wmss_sld_body would only end up adding one paramater. If all
> your consececutive layers follow these criterias, It shoudl merge.
>
>   Thinking about It and reading the doc, I am not sure why the number of
> parameters is added into the test.
>
> Later,
>
>
> J. Parapar wrote:
> > Hi all
> >
> > We have several wms layers with the same wms server in our mapfile
> > client and MapServer is making one GetMap request for each of the
> > layers. All the layers have the parameter wms_sld_body set to AUTO. In
> > some tests with layers without SLD MapServer do merges several layers
> > into a single multi-layer GetMap request. Does this optimization only
> > works with non SLD layers?
> >
> > Thanks in advance,
> > Jorge
> >
> >
>
> --
> ----------------------------------------------------------------
> Assefa Yewondwossen
> Software Analyst
>
> Email: assefa at dmsolutions.ca
> http://www.dmsolutions.ca/
>
> Phone: (613) 565-5056 (ext 14)
> Fax:   (613) 565-0925
> ----------------------------------------------------------------
>
>



More information about the MapServer-users mailing list