<span style=" font-size:10pt;font-family:sans-serif">Thank you Jukka,</span><br><br><span style=" font-size:10pt;font-family:sans-serif">that's it!</span><br><br><span style=" font-size:10pt;font-family:sans-serif">Michael<br></span><br><br><br><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Von:
</span><span style=" font-size:9pt;font-family:sans-serif">"Rahkonen
Jukka" <jukka.rahkonen@maanmittauslaitos.fi></span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">An:
</span><span style=" font-size:9pt;font-family:sans-serif">"Michael
Otto" <michael.otto@data-experts.de>, "gdal-dev@lists.osgeo.org"
<gdal-dev@lists.osgeo.org></span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Datum:
</span><span style=" font-size:9pt;font-family:sans-serif">27.03.2024
14:39</span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Betreff:
</span><span style=" font-size:9pt;font-family:sans-serif">Re:
[gdal-dev] ERROR 1: Couldn't fetch requested layer when using a filter
in the ogr2ogr- GetFeature request</span><br><hr noshade><br><br><p style="margin-top:0px;margin-Bottom:0px"><span style=" font-size:12pt;font-family:Calibri">Hi,</span></p><p style="margin-top:0px;margin-Bottom:0px"><span style=" font-size:12pt;font-family:Calibri"> </span></p><p style="margin-top:0px;margin-Bottom:0px"><span style=" font-size:12pt;font-family:Calibri">Works
for me with an URL encoded request:<br><br>ogrinfo "</span><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=%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"><span style=" font-size:12pt;font-family:Calibri">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</span></a><span style=" font-size:12pt;font-family:Calibri">"
-al<br><br>-Jukka Rahkonen-</span></p><p style="margin-top:0px;margin-Bottom:0px"><span style=" font-size:12pt;font-family:Calibri"> </span></p><p style="margin-top:0px;margin-Bottom:0px"><span style=" font-size:12pt;font-family:Calibri"><b>Lähettäjä:</b>gdal-dev <gdal-dev-bounces@lists.osgeo.org> <b>Puolesta </b>Michael
Otto via gdal-dev<b><br>Lähetetty:</b> keskiviikko 27. maaliskuuta 2024 15.29<b><br>Vastaanottaja:</b> gdal-dev@lists.osgeo.org<b><br>Aihe:</b> [gdal-dev] ERROR 1: Couldn't fetch requested layer when using
a filter in the ogr2ogr- GetFeature request</span></p><p style="margin-top:0px;margin-Bottom:0px"><span style=" font-size:12pt;font-family:Calibri"> </span></p><p style="margin-top:0px;margin-Bottom:0px"><span style=" font-size:12pt;font-family:Arial">Hello,</span><span style=" font-size:12pt;font-family:Calibri"><br></span><span style=" font-size:12pt;font-family:Arial"><br>I'm trying to query a free WFS with filter values via ogr2ogr and write
the results to a GeoJson file. </span><span style=" font-size:12pt;font-family:Calibri"><br></span><span style=" font-size:12pt;font-family:Arial"><br>If I use the following URL incl. filter:</span><span style=" font-size:12pt;font-family:Calibri"><br></span><span style=" font-size:12pt;color:blue;font-family:Calibri"><u><br></u></span><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:12pt;color:blue;font-family:Arial"><u>https://isk.geobasis-bb.de/ows/feldblockkataster_wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=refbb:Feldblock&SRSNAME=EPSG:25833&filter=</u></span></a><span style=" font-size:12pt;font-family:Arial"><fes:Filter
xmlns:fes="</span><a href=http://www.opengis.net/fes/2.0><span style=" font-size:12pt;color:blue;font-family:Arial"><u>http://www.opengis.net/fes/2.0</u></span></a><span style=" font-size:12pt;font-family:Arial">"
xmlns:xsi="</span><a href="http://www.w3.org/2001/XMLSchema-instance"><span style=" font-size:12pt;color:blue;font-family:Arial"><u>http://www.w3.org/2001/XMLSchema-instance</u></span></a><span style=" font-size:12pt;font-family:Arial">"
xsi:schemaLocation="</span><a href=http://www.opengis.net/fes/2.0><span style=" font-size:12pt;color:blue;font-family:Arial"><u>http://www.opengis.net/fes/2.0</u></span></a><a href=http://schemas.opengis.net/filter/2.0/filterAll.xsd><span style=" font-size:12pt;color:blue;font-family:Arial"><u>http://schemas.opengis.net/filter/2.0/filterAll.xsd</u></span></a><span style=" font-size:12pt;font-family:Arial">">
<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><span style=" font-size:12pt;font-family:Calibri"><br></span><span style=" font-size:12pt;font-family:Arial"><br>get the error message:</span><span style=" font-size:12pt;font-family:Calibri"><br></span><span style=" font-size:12pt;font-family:Arial"><br>ERROR 1: Couldn't fetch requested layer '</span><a href=http://schemas.opengis.net/filter/2.0/filterAll><span style=" font-size:12pt;color:blue;font-family:Arial"><u>http://schemas.opengis.net/filter/2.0/filterAll</u></span></a><span style=" font-size:12pt;font-family:Arial">.
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><span style=" font-size:12pt;font-family:Calibri"><br></span><span style=" font-size:12pt;font-family:Arial"><br>and no results.</span><span style=" font-size:12pt;font-family:Calibri"><br></span><span style=" font-size:12pt;font-family:Arial"><br>If I submit the GetFeature request directly in the browser, I get the expected
result (namely exactly 2 features).<br>Without the filter on the URL, my GetFeature requests also work as expected
with ogr2ogr.</span><span style=" font-size:12pt;font-family:Calibri"><br></span><span style=" font-size:12pt;font-family:Arial"><br>What am I doing wrong?</span><span style=" font-size:12pt;font-family:Calibri"><br></span><span style=" font-size:12pt;font-family:Arial"><br>Michael</span><span style=" font-size:12pt;font-family:Calibri"> </span></p><p style="margin-top:0px;margin-Bottom:0px"></p><p style="margin-top:0px;margin-Bottom:0px"></p><font face="sans-serif"></font>