<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-signature">Hi, <br>
      thank you for the fast reply. Unfortunately, even with the srs
      given with the bbox the "Fetch" command does not forward any bbox
      at all. So mapserver / OGR fetches up to the max number of
      features given no matter where they are located. They are then
      filtered out by mapserver using the original bbox because they do
      not fit (just the first 500 or so).<br>
      <br>
      Mapfile layer definition (sorry I forgot):<br>
      LAYER<br>
          NAME "GROUND_REFERENCE_VALUES_NI"<br>
          UNITS METERS<br>
          TYPE POLYGON<br>
          DEBUG  "5"<br>
          CONNECTION "ground_reference_values_ni.xml"<br>
          CONNECTIONTYPE OGR<br>
          STATUS ON<br>
          DATA "boris:BR_BodenrichtwertZonal"<br>
          METADATA<br>
            "wfs_srs" "EPSG:25832"<br>
            "wfs_version"    "1.1.0"<br>
            "wfs_storedquery_id" ""<br>
            "wfs_title"    "GROUND_REFERENCE_VALUES_NI"<br>
            "wfs_connectiontimeout" "30"<br>
            "wfs_typename"    "GROUND_REFERENCE_VALUES_NI_int"<br>
            "wfs_maxfeatures"       "500"<br>
            "gml_include_items" "all"<br>
            "wfs_enable_request" "*"<br>
            "gml_featureid"     "gml_id"<br>
            <br>
          END # METADATA<br>
      <br>
          PROJECTION<br>
            "init=epsg:25832"<br>
          END # PROJECTION<br>
          CLASS<br>
            NAME "reference_map"<br>
            STYLE<br>
              OUTLINECOLOR 255 0 0<br>
              WIDTH 0.7<br>
            END # STYLE<br>
          END # CLASS<br>
        END # LAYER<br>
      <br>
      The XML file referenced is in attach.<br>
      <br>
      Best<br>
      Lars<br>
      <div>
        <br>
      </div>
    </div>
    <div class="moz-cite-prefix">Am 29.03.22 um 10:06 schrieb
      <a class="moz-txt-link-abbreviated" href="mailto:artclifford@gmail.com">artclifford@gmail.com</a>:<br>
    </div>
    <blockquote type="cite"
      cite="mid:018a01d84343$e7882a00$b6987e00$@gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@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;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}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]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hi Lars,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Might this help?<o:p></o:p></p>
        <p class="MsoNormal"><a
href="https://gis.stackexchange.com/questions/225535/wfs-and-wms-query-srs-parameter-and-bbox-usage"
            moz-do-not-send="true">geoserver - WFS and WMS query SRS
            parameter and BBOX usage - Geographic Information Systems
            Stack Exchange</a><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I haven’t done much with the WFS tech but
          based on the link above, you may need to provide the crs info
          for the bbox. <o:p></o:p></p>
        <p class="MsoNormal">In their example:<o:p></o:p></p>
        <p class="MsoNormal"><a
href="http://demo.geo-solutions.it/geoserver/tiger/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=tiger:tiger_roads&srsName=EPSG:3857&bbox=40.7,-74,40.8,-73,urn:ogc:def:crs:EPSG:4326&maxFeatures=1"
            moz-do-not-send="true">http://demo.geo-solutions.it/geoserver/tiger/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=tiger:tiger_roads&srsName=EPSG:3857&bbox=40.7,-74,40.8,-73,urn:ogc:def:crs:EPSG:4326&maxFeatures=1</a><o:p></o:p></p>
        <p class="MsoNormal">Note the bbox is defined as:<br>
          bbox=40.7,-74,40.8,-73,urn:ogc:def:crs:EPSG:4326<o:p></o:p></p>
        <p class="MsoNormal"><br>
          If your bbox is the same as the requested projection:<br>
          your bbox in the wfs request would be:<o:p></o:p></p>
        <p class="MsoNormal">BBOX=545592,5806696,548144,5810131,urn:ogc:def:crs:
          EPSG:25832<br>
          <br>
          Or the epsg code at the end would be whatever units your bbox
          is in.<br>
          Note, the bbox EPSG code can be different than the srsName<o:p></o:p></p>
        <p class="MsoNormal"><br>
          <br>
          <o:p></o:p></p>
        <p class="MsoNormal"> <o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b>From:</b> MapServer-users
              <a class="moz-txt-link-rfc2396E" href="mailto:mapserver-users-bounces@lists.osgeo.org"><mapserver-users-bounces@lists.osgeo.org></a> <b>On
                Behalf Of </b>Lars Fricke<br>
              <b>Sent:</b> Tuesday, March 29, 2022 12:31 AM<br>
              <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
              <b>Subject:</b> [mapserver-users] mapserver OGR does not
              forward BBOX at all<o:p></o:p></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Hi All,<br>
          <br>
          First of all, thank you for your support and great work on
          Mapserver!<br>
          <br>
          I have a strange issue using either OGR WFS driver on
          Mapserver 7.6.4-1 or ogrinfo (GDAL 3.0.4, released 2020/01/28)
          on Ubuntu 20.<br>
          <br>
          When I call on a particular public server, mapserver / gdal /
          ogr does not seem to forward the bbox. I had a similar issue
          before (over a year ago) on another server but this was fixed
          by an update in GDAL it seemed. <br>
          <br>
          The Server is <br>
          <br>
          `<a
href="https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022</a>?`<br>
          <br>
          The Layer is <br>
          `boris:BR_BodenrichtwertZonal`<br>
          <br>
          A direct call from the browser works:<br>
          <br>
          `<a
href="https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&SRSNAME=EPSG:25832&BBOX=545592,5806696,548144,5810131&TYPENAMES=boris:BR_BodenrichtwertZonal"
            moz-do-not-send="true">https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&SRSNAME=EPSG:25832&BBOX=545592,5806696,548144,5810131&TYPENAMES=boris:BR_BodenrichtwertZonal</a>`<br>
          <br>
          I can see in Mapserver log (CONFIG "CPL_DEBUG" "ON"  CONFIG
          "PROJ_DEBUG" "ON") that the BBOX is missing:<br>
          <br>
          `Fetch(<a
href="https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=500&SRSNAME=EPSG:25832&TRUST_CAPABILITIES_BOUNDS=YES&REQUEST=GetFeature&TYPENAME=boris:BR_BodenrichtwertZonal"
            moz-do-not-send="true">https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=500&SRSNAME=EPSG:25832&TRUST_CAPABILITIES_BOUNDS=YES&REQUEST=GetFeature&TYPENAME=boris:BR_BodenrichtwertZonal</a>)`<br>
          <br>
          By the way, it does not matter if WFS 1.1.0 or 2.0.0 are used.<br>
          <br>
          Trying with ogrinfo:<br>
          ```<br>
          ogrinfo -ro -spat 545592 5806696 548144 5810131 WFS:<a
href="https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022"
            moz-do-not-send="true">"https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022"</a>
          "boris:BR_BodenrichtwertZonal"<br>
          <br>
          INFO: Open of `WFS:<a
href="https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022</a>'<br>
                using driver `WFS' successful.<br>
          Metadata:<br>
            ABSTRACT=BORIS 2022 WFS by XtraServer<br>
            PROVIDER_NAME=Landesamt für Geoinformation und
          Landesvermessung Niedersachsen (LGLN) - Landesbetrieb
          Landesvermessung und Geobasisinformation<br>
            TITLE=BORIS 2022 WFS<br>
          ERROR 1: No schema information loaded<br>
          Warning 1: NAS: Skipping geometry without feature<br>
          <br>
          Layer name: boris:BR_BodenrichtwertZonal<br>
          Metadata:<br>
            TITLE=boris_BR_BodenrichtwertZonal<br>
          Geometry: None<br>
          Feature Count: 33931<br>
          ```<br>
          There should be some 62 Features in that bbox.<br>
          <br>
          Any help is much appreciated.<br>
          <br>
          Best<br>
          <br>
          Lars <o:p></o:p></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>