<html>
<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;}
span.Shkpostityyli18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-ligatures:none;
        mso-fareast-language:EN-US;}
@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="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi,<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">Works for me with an URL encoded request:<br>
<br>
ogrinfo "https://isk.geobasis-bb.de/ows/feldblockkataster_wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=refbb:Feldblock&SRSNAME=EPSG:25833&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%20xmlns:xsi=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsi:schemaLocation=%22http://www.opengis.net/fes/2.0http://schemas.opengis.net/filter/2.0/filterAll.xsd%22%3E%20%3Cfes:And%3E%20%3Cfes:PropertyIsEqualTo%3E%20%3Cfes:ValueReference%3EFLIK%3C/fes:ValueReference%3E%20%3Cfes:Literal%3EDEBBLI1873413738%3C/fes:Literal%3E%20%3C/fes:PropertyIsEqualTo%3E%20%3Cfes:PropertyIsEqualTo%3E%20%3Cfes:ValueReference%3EFACHL_GUELTIG_AB%3C/fes:ValueReference%3E%20%3Cfes:Literal%3E2022-01-01%3C/fes:Literal%3E%20%3C/fes:PropertyIsEqualTo%3E%20%3C/fes:And%3E%20%3C/fes:Filter%3E"
 -al<br>
<br>
-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 style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> gdal-dev <gdal-dev-bounces@lists.osgeo.org>
<b>Puolesta </b>Michael Otto via gdal-dev<br>
<b>Lähetetty:</b> keskiviikko 27. maaliskuuta 2024 15.29<br>
<b>Vastaanottaja:</b> gdal-dev@lists.osgeo.org<br>
<b>Aihe:</b> [gdal-dev] ERROR 1: Couldn't fetch requested layer when using a filter in the ogr2ogr- GetFeature request<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Hello,</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">I'm trying to query a free WFS with filter values via ogr2ogr and write the results to a GeoJson file.
</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">If I use the following URL incl. filter:</span><br>
<br>
<a href="https://isk.geobasis-bb.de/ows/feldblockkataster_wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=refbb:Feldblock&SRSNAME=EPSG:25833&filter="><span style="font-size:10.0pt;font-family:"Arial",sans-serif">https://isk.geobasis-bb.de/ows/feldblockkataster_wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=refbb:Feldblock&SRSNAME=EPSG:25833&filter=</span></a><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><fes:Filter
 xmlns:fes="</span><a href="http://www.opengis.net/fes/2.0"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">http://www.opengis.net/fes/2.0</span></a><span style="font-size:10.0pt;font-family:"Arial",sans-serif">" xmlns:xsi="</span><a href="http://www.w3.org/2001/XMLSchema-instance"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">http://www.w3.org/2001/XMLSchema-instance</span></a><span style="font-size:10.0pt;font-family:"Arial",sans-serif">"
 xsi:schemaLocation="</span><a href="http://www.opengis.net/fes/2.0"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">http://www.opengis.net/fes/2.0</span></a><a href="http://schemas.opengis.net/filter/2.0/filterAll.xsd"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">http://schemas.opengis.net/filter/2.0/filterAll.xsd</span></a><span style="font-size:10.0pt;font-family:"Arial",sans-serif">">
 <fes:And> <fes:PropertyIsEqualTo> <fes:ValueReference>FLIK</fes:ValueReference> <fes:Literal>DEBBLI1873413738</fes:Literal> </fes:PropertyIsEqualTo> <fes:PropertyIsEqualTo> <fes:ValueReference>FACHL_GUELTIG_AB</fes:ValueReference> <fes:Literal>2022-01-01</fes:Literal>
 </fes:PropertyIsEqualTo> </fes:And> </fes:Filter></span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">get the error message:</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">ERROR 1: Couldn't fetch requested layer '</span><a href="http://schemas.opengis.net/filter/2.0/filterAll"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">http://schemas.opengis.net/filter/2.0/filterAll</span></a><span style="font-size:10.0pt;font-family:"Arial",sans-serif">.
 xsd> <fes:And> <fes:PropertyIsEqualTo> <fes:ValueReference>FLIK</fes:ValueReference> <fes:Literal>DEBBLI1873413738</fes:Literal> </fes:PropertyIsEqualTo> <fes: PropertyIsEqualTo> <fes:ValueReference>FACHL_GUELTIG_AB</fes:ValueReference> <fes:Literal>2022-01-01</fes:Literal>
 </fes:PropertyIsEqualTo> </fes:And> </fes:Filter>'!</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">and no results.</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">If I submit the GetFeature request directly in the browser, I get the expected result (namely exactly 2 features).</span><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">Without the filter on the URL, my GetFeature requests also work as expected with ogr2ogr.</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">What am I doing wrong?</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">Michael</span> <o:p>
</o:p></p>
</div>
</body>
</html>