<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=iso-8859-1">
<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
p.qt-msonormal1, li.qt-msonormal1, div.qt-msonormal1
        {mso-style-name:qt-msonormal1;
        margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.qt-msolistparagraph1, li.qt-msolistparagraph1, div.qt-msolistparagraph1
        {mso-style-name:qt-msolistparagraph1;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.qt-msolistparagraph2, li.qt-msolistparagraph2, div.qt-msolistparagraph2
        {mso-style-name:qt-msolistparagraph2;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.size
        {mso-style-name:size;}
span.Shkpostityyli29
        {mso-style-type:personal-compose;
        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;}
/* List Definitions */
@list l0
        {mso-list-id:205487367;
        mso-list-template-ids:2032937832;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1
        {mso-list-id:1212617372;
        mso-list-template-ids:1048500818;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2
        {mso-list-id:1580482016;
        mso-list-template-ids:-346918954;}
@list l2:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level2
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level5
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level8
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi Seth,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">The pygeoapi has vendor specific parameters defined in the api
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><a href="https://demo.pygeoapi.io/cite/openapi?f=json"><span lang="EN-US">https://demo.pygeoapi.io/cite/openapi?f=json</span></a></span><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">and it accepts extra parameters
<a href="https://demo.pygeoapi.io/cite/collections/canada-hydat-daily-mean-02hc003/items?foo=bar">
https://demo.pygeoapi.io/cite/collections/canada-hydat-daily-mean-02hc003/items?foo=bar</a>. Because that service is named “cite” I believe that it is an OGC compliant way to allow extra parameters.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">The issue with invalid geometries comes from testing. The test compares if the returned geometries (or bboxes, I am not sure) really intersect with the bbox that was used in the query.
 But if the Teamengine compares a bbox polygon that it knows by itself with an invalid polygon from OGCFeat, and ST_Intersects or some equivalent function says No, then the test is failed. I made my own test with those geometries with PostGIS and the result
 was indeed false, so no intersection=>failure.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">I believe that for the standard it is OK if server sends invalid geometries so no need to throw an error on Mapserver side. However, because it is impossible to test geometric relations
 if geometries are invalid we should use valid data for CITE tests. And also check that data stays valid when converted into GeoJSON. Of course also from user point of view it would be nice to get good geometries. Could we push the output through MakeValid?
 Does Mapserver have MakeValid?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language: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>Lähettäjä:</b> Seth G <sethg@geographika.co.uk> <br>
<b>Lähetetty:</b> keskiviikko 18. lokakuuta 2023 13.15<br>
<b>Vastaanottaja:</b> Rahkonen Jukka <jukka.rahkonen@maanmittauslaitos.fi>; MapServer Devs <MapServer-dev@lists.osgeo.org><br>
<b>Aihe:</b> Re: [MapServer-dev] OGC API Features: some failures in CITE tests<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Thanks Jukka for testing with the validator. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The extra parameters issue has been discussed before - a major issue is that all cookie parameters are seen as request parameters. See [1] and [2]. I'm not sure if it has been addressed in pygeoapi which is the reference implementation.
 MapServer also uses parameters for runtime-subsitution so enforcing no extra parameters will break a lot of MapServer workflows.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I think it was suggested adding a "strict" WEB METADATA item that would return a 400 error when extra parameters were encountered - this would allow tests to pass fo a particular server.
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">What is the service meant to do with invalid geometry such as that polygon - throw an error?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">It would be good to open the other items as issues on GitHub to fix.
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Seth<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">[1] <a href="https://lists.osgeo.org/pipermail/mapserver-dev/2021-September/016620.html">
https://lists.osgeo.org/pipermail/mapserver-dev/2021-September/016620.html</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">[2] <a href="https://github.com/MapServer/MapServer/pull/6400#issuecomment-936458600">
https://github.com/MapServer/MapServer/pull/6400#issuecomment-936458600</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div id="sig62266145">
<div>
<p class="MsoNormal">--<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">web:<a href="https://geographika.net/">https://geographika.net</a> & <a href="https://mapserverstudio.net/">https://mapserverstudio.net</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">twitter: @geographika<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">On Wed, Oct 18, 2023, at 9:21 AM, Rahkonen Jukka via MapServer-dev wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt;overflow-wrap:break-word" id="qt">
<div>
<p class="qt-msonormal1">Hi,<o:p></o:p></p>
<p class="qt-msonormal1"> <o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">I used the OGC Teamengine for testing our OGCFeat demo at
<a href="https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi"><span style="color:#0563C1">https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi</span></a>.</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">The validator found a few issues:</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<ul style="margin-top:0cm" type="disc">
<li class="qt-msolistparagraph2" style="margin-left:0cm;mso-list:l1 level1 lfo1">
<span lang="EN-US">Wrong http status code: returns 400, should be 200</span><o:p></o:p></li></ul>
<p class="qt-msolistparagraph1"><span lang="EN-US"><a href="https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/countries/items?bbox=177.0000000%2C65.0000000%2C-177.0000000%2C70.0000000"><span style="color:#0563C1">https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/countries/items?bbox=177.0000000%2C65.0000000%2C-177.0000000%2C70.0000000</span></a></span><o:p></o:p></p>
<ul style="margin-top:0cm" type="disc">
<li class="qt-msolistparagraph2" style="margin-left:0cm;mso-list:l2 level1 lfo2">
<span lang="EN-US">Some tests fail because the service returns invalid geometries. Mapserver actually works right but because of invalid topology the validator fails. For example a geometry of the France multipolygon, somewhere near the French Guiana is invalid
 due to duplicated vertices at  POINT (-52.939657 2.124858). The BBOX in the test was BBOX= -1.5000000,50.0000000,1.5000000,53.0000000. There are other similar geometries showing self-intersection.</span><o:p></o:p></li><li class="qt-msolistparagraph2" style="margin-left:0cm;mso-list:l2 level1 lfo2">
<span lang="EN-US">If query contains an unknown parameter then our server sends data, but it should error out and send a http 400 error.</span><o:p></o:p></li></ul>
<p class="qt-msolistparagraph1"><span lang="EN-US">Test request: </span><a href="https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/ocean-labels/items?unknownQueryParameter13515=1"><span lang="EN-US" style="color:#0563C1">https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/ocean-labels/items?unknownQueryParameter13515=1</span></a><o:p></o:p></p>
<ul style="margin-top:0cm" type="disc">
<li class="qt-msolistparagraph2" style="margin-bottom:12.0pt;margin-left:0cm;mso-list:l0 level1 lfo3">
<span lang="EN-US">The Content-Crs header is missing when the request is using the default crs. Test query:
<a href="https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/ocean/items?f=json">
<span style="color:#0563C1">https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi/collections/ocean/items?f=json</span></a></span><o:p></o:p></li></ul>
<p class="qt-msonormal1"><span lang="EN-US">I have looked at the extra parameter thing from the standard and from the discussions in the OGC GitHub. Notes from the research:</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"><br>
The server SHALL respond with a response with the status code </span><span class="size"><span style="font-size:10.0pt;font-family:"Courier New"">400</span></span><span lang="EN-US">, if the request URI includes a query parameter that is not specified in the
 API definition. For omitting unknown “vendor specific” parameters is must be defined in the API as</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p style="margin:0cm"><span lang="EN-US">in: query</span><o:p></o:p></p>
<p style="margin:0cm"><span lang="EN-US">name: vendorSpecificParameters</span><o:p></o:p></p>
<p style="margin:0cm"><span lang="EN-US">schema:  </span><o:p></o:p></p>
<p style="margin:0cm"><span lang="EN-US">type: object  </span><o:p></o:p></p>
<p style="margin:0cm"><span lang="EN-US">additionalProperties: true</span><o:p></o:p></p>
<p style="margin:0cm"><span lang="EN-US">style: form </span><o:p></o:p></p>
<p><span lang="EN-US">If a server wants to support vendor specific parameters, these have to be explicitly declared in the API definition. If OpenAPI is used to represent the API definition, a capability exists to allow additional parameters without explicitly
 declaring them. That is, parameters that have not been explicitly specified in the API definition for the operation will be ignored.</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">With minor changes Mapserver could get the certificates for OGC API Features Core and CRS. But I wonder what to do with the demo service. The server that is used for the CITE tests must be available online. We could
 try to fix the existing Natural Earth data and service so that it sends topologically valid geometries. Another option would be to set up another service instance for CITE tests with some known valid datasets.</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">-Jukka Rahkonen-</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">_______________________________________________<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">MapServer-dev mailing list<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="mailto:MapServer-dev@lists.osgeo.org"><span style="color:#0563C1">MapServer-dev@lists.osgeo.org</span></a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-dev"><span style="color:#0563C1">https://lists.osgeo.org/mailman/listinfo/mapserver-dev</span></a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>