<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
code
{mso-style-priority:99;
font-family:"Courier New";}
pre
{mso-style-priority:99;
mso-style-link:"HTML-esimuotoiltu Char";
margin:0cm;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-language:FI;}
span.HTML-esimuotoiltuChar
{mso-style-name:"HTML-esimuotoiltu Char";
mso-style-priority:99;
mso-style-link:HTML-esimuotoiltu;
font-family:Consolas;
mso-fareast-language:EN-US;}
span.Shkpostityyli23
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="#0563C1" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Even,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Both extent-spatial-bbox and numberMatched are optional in the OAPIF standard so good that they now got tested with our service
</span><span lang="EN-US" style="font-family:"Segoe UI Emoji",sans-serif">😉</span><span lang="EN-US">. I don’t know why we have not configured the extents, we could well use the fixed BBOX of Finland for most collections. Omitting numberMatched is intentional.
You know how slow it can be to run “select count(*) from…” . <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:FI">Lähettäjä:</span></b><span style="mso-fareast-language:FI"> Even Rouault <even.rouault@spatialys.com>
<br>
<b>Lähetetty:</b> perjantai 15. syyskuuta 2023 20.49<br>
<b>Vastaanottaja:</b> Rahkonen Jukka <jukka.rahkonen@maanmittauslaitos.fi>; qgis-user@lists.osgeo.org<br>
<b>Aihe:</b> Re: [Qgis-user] OAPIF does not honour the view extent<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Jukka,<span style="mso-fareast-language:FI"><o:p></o:p></span></p>
<p>Fixed per <a href="https://github.com/qgis/QGIS/pull/54617">https://github.com/qgis/QGIS/pull/54617</a> . The infinite items request came from when requesting the feature count.<o:p></o:p></p>
<p>The server returns sub-optimal content for QGIS usage:<o:p></o:p></p>
<p>- the collection metadata does not advertize a extent.spatial.bbox<o:p></o:p></p>
<p>- the /items answers don't include a "<code><span style="font-size:10.0pt">numberMatched</span></code>" property that would help to get the feature count (QGIS emits a /items?limit=1 hoping that it returns numberMatched)<o:p></o:p></p>
<p>Even<o:p></o:p></p>
<div>
<p class="MsoNormal">Le 12/09/2023 à 17:01, Rahkonen Jukka via QGIS-User a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">I hoped that the OAPIF driver would honor the check box “Only request features overlapping the view extent” but at least in QGIS 3.32 that does not happen.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">How to test:<br>
- Set project into EPSG:4326</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">- Open the Debugging/development tools</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">- Zoom for example to lat-lon 63.189111,23.538514 and set scale into 1:5000</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">- Add collection “building” from an open OAPIF service
<a href="https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/">
https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/</a>. Use feature paging with page size 1000.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">- Remove the layer from the project because otherwise QGIS continues downloading a few million building polygons</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">- Check the http requests</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">The http history shows that after a bunch of probing OAPIF requests QGIS sends plain &items= request without &bbox= and thus asks the server to send the whole collection. What QGIS does right is that it follows the next-links
and continues downloading.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/collections/building/items?limit=1000&crs=http://www.opengis.net/def/crs/EPSG/0/4326">https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/collections/building/items?limit=1000&crs=http://www.opengis.net/def/crs/EPSG/0/4326</a></span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">I wonder if the view extent limit should work also for OAPIF or is a not-yet implemented feature?</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-</span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:FI"><br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>QGIS-User mailing list<o:p></o:p></pre>
<pre><a href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a><o:p></o:p></pre>
<pre>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre>
<pre>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre><a href="http://www.spatialys.com/">http://www.spatialys.com</a><o:p></o:p></pre>
<pre>My software is free, but my time generally not.<o:p></o:p></pre>
</div>
</body>
</html>