<div dir="ltr">Marco, for the root I thought the OWS setting was used [1], while it isn't for the groups/layers childs [2]. Is it right?<div><br></div><div>giovanni<br><div><div><br></div><div>[1] <a href="https://github.com/qgis/QGIS/blob/master/src/mapserver/qgsprojectparser.cpp#L138">https://github.com/qgis/QGIS/blob/master/src/mapserver/qgsprojectparser.cpp#L138</a></div>
<div>[2] <a href="https://github.com/qgis/QGIS/blob/master/src/mapserver/qgsprojectparser.cpp#L980">https://github.com/qgis/QGIS/blob/master/src/mapserver/qgsprojectparser.cpp#L980</a></div></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2014-02-14 Marco Hugentobler <span dir="ltr"><<a href="mailto:marco.hugentobler@sourcepole.ch" target="_blank">marco.hugentobler@sourcepole.ch</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Bernhard<br>
<br>
That option was meant to give the webclient a hint where to zoom first. But it probably was forgotten in the server and I agree it would be good to overwrite the calculated box in the toplevel group.<br>
<br>
Regards,<br>
Marco<div class="HOEnZb"><div class="h5"><br>
<br>
On 14.02.2014 10:58, Bernhard Ströbl wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Marco,<br>
<br>
I have a question in this context (I thought I made ticket but cannot find it)<br>
What is the sense of setting the bounding box in OWS tab if it is always calculated to the sum of the bboxes of the layers in the project? IMHO setting the bbox in the project properties should override any calculation result.<br>

Background: One of my layers became empty because a user deleted the last record thus its bbox was calculated to be the whole earth resulting in QGIS server propagating the whole earth as bbox for this project.<br>
<br>
Bernhard<br>
<br>
Am 14.02.2014 10:34, schrieb Marco Hugentobler:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Andrea, Giovanni<br>
<br>
QGIS Server doesn't calculate the bbox itself, but it queries the extent<br>
from the layers. So it can be that certain providers calculate the bbox<br>
(of course only if the layer / capabilities document is not cached).<br>
<br>
For a faster startup, having a persistent cache as Giovanni suggested<br>
might help.<br>
<br>
Regards,<br>
Marco<br>
<br>
On 14.02.2014 10:18, G. Allegri wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
    I don't understand why the qgis-server eed to calculate always the<br>
    bbox.<br>
    In the server project windows,<br>
    qgis ask for the published bbox.<br>
    Why it don't use it as bbox rather than calculate it on every<br>
    request ?<br>
<br>
<br>
Marco, correct me if I'm wrong.<br>
QGIS Server doesn't calculate the BBOX, it parses the layers extents<br>
from the .qgs project and then combine them to obtain the entire BBOX.<br>
The only operation it does is reprojecting the extents to WGS84 to<br>
create the EX_GeographicBoundingBox element.<br>
<br>
Anyway, in case the project advertises and extent, the combined extent<br>
won't be calculated, so in your case this phase shouldn't be the<br>
bottleneck...<br>
<br>
giovanni<br>
<br>
<br>
<br>
<br>
    The FastCGI don't help really.<br>
    In a publishing environment every few hour the instances are<br>
    restated to removed zombi process.<br>
    This mean that every few hours the FastCGI are emptied and reloaded.<br>
    A fastcgi environment mean to load 20 instances of QGIS-server and<br>
    every of them do them own elaboration .<br>
    As the bbox calculation for every layer.<br>
<br>
    GASP.<br>
    The start could ask about one hours and more.<br>
<br>
    Also another problem with the fastcig is that when<br>
    I change something on a project I need to restart to Web instances<br>
    to dismiss the actual project and reload the new.<br>
<br>
    So every change in a qgis project need a restart of all proccess<br>
    (20 and so on in a fastcgi enviroment) every with a slow bbox<br>
    calculation phase.<br>
<br>
    mmhh...<br>
<br>
    :/<br>
<br>
<br>
<br>
    2014-02-14 9:13 GMT+01:00 G. Allegri <<a href="mailto:giohappy@gmail.com" target="_blank">giohappy@gmail.com</a><br>
    <mailto:<a href="mailto:giohappy@gmail.com" target="_blank">giohappy@gmail.com</a>>>:<br>
<br>
<br>
<br>
<br>
        2014-02-14 Marco Hugentobler <<a href="mailto:marco.hugentobler@sourcepole.ch" target="_blank">marco.hugentobler@sourcepole.<u></u>ch</a><br>
        <mailto:<a href="mailto:marco.hugentobler@sourcepole.ch" target="_blank">marco.hugentobler@<u></u>sourcepole.ch</a>>>:<br>
<br>
            Hi Andrea<br>
<br>
<br>
            >I suspect that QS try always to recalc the box of every<br>
            layer.<br>
<br>
            QGIS server caches layers (up to 100, but that can be<br>
            enhanced using the environment variable<br>
            MAX_CACHE_LAYERS).  Furthermore, the GetCapabilities<br>
            documents are cached (so no recalculation if using FastCGI).<br>
<br>
<br>
        Thanks Marco, you confirmed what I told Andrea.<br>
        It would be a good enhancement if caching could be done in a<br>
        persitent manner (out of memory). We could consider, in the<br>
        future, to use memcache or something similar.<br>
<br>
        giovanni<br>
<br>
        ______________________________<u></u>_________________<br>
        Qgis-user mailing list<br>
        <a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a> <mailto:<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.<u></u>org</a>><br>
        <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-user</a><br>
<br>
<br>
<br>
<br>
    --<br>
    -----------------<br>
    Andrea Peri<br>
    . . . . . . . . .<br>
    qwerty àèìòù<br>
    -----------------<br>
<br>
<br>
<br>
<br>
-- <br>
Giovanni Allegri<br>
<a href="http://about.me/giovanniallegri" target="_blank">http://about.me/<u></u>giovanniallegri</a><br>
Twitter: <a href="https://twitter.com/_giohappy_" target="_blank">https://twitter.com/_giohappy_</a><br>
blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>
GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a><br>
</blockquote>
<br>
<br>
-- <br>
Dr. Marco Hugentobler<br>
Sourcepole -  Linux & Open Source Solutions<br>
Weberstrasse 5, CH-8004 Zürich, Switzerland<br>
<a href="mailto:marco.hugentobler@sourcepole.ch" target="_blank">marco.hugentobler@sourcepole.<u></u>ch</a>  <a href="http://www.sourcepole.ch" target="_blank">http://www.sourcepole.ch</a><br>
Technical Advisor QGIS Project Steering Committee<br>
<br>
<br>
<br>
__________ Information from ESET Mail Security, version of virus<br>
signature database 9421 (20140213) __________<br>
<br>
The message was checked by ESET Mail Security.<br>
<a href="http://www.eset.com" target="_blank">http://www.eset.com</a><br>
<br>
<br>
______________________________<u></u>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-user</a><br>
<br>
<br>
__________ Information from ESET Mail Security, version of virus signature database 9421 (20140213) __________<br>
<br>
The message was checked by ESET Mail Security.<br>
<a href="http://www.eset.com" target="_blank">http://www.eset.com</a><br>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
-- <br>
Dr. Marco Hugentobler<br>
Sourcepole -  Linux & Open Source Solutions<br>
Weberstrasse 5, CH-8004 Zürich, Switzerland<br>
<a href="mailto:marco.hugentobler@sourcepole.ch" target="_blank">marco.hugentobler@sourcepole.<u></u>ch</a> <a href="http://www.sourcepole.ch" target="_blank">http://www.sourcepole.ch</a><br>
Technical Advisor QGIS Project Steering Committee<br>
<br>
______________________________<u></u>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-user</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Giovanni Allegri<br><a href="http://about.me/giovanniallegri" target="_blank">http://about.me/giovanniallegri</a><div>Twitter: <a href="https://twitter.com/_giohappy_" target="_blank">https://twitter.com/_giohappy_</a></div>
<div>blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a></div></div>
</div>