Hi,

Thanks for the hint. That server seems to support WFS 1.0.0 but I did not want to rely on such an old standard as I don't know how long they will keep this up. I am seeing a lot of providers around here that drop 1.0.0 support. If OGR does not work I guess I'll have to try anyhow.

Lars


Am 31.03.22 um 15:40 schrieb Rahkonen Jukka (MML):

Hi,

 

Have you tried the connectiontype=WFS alternative https://mapserver.gis.umn.edu/ogc/wfs_client.html? I am not sure what WFS versions it supports.

 

-Jukka Rahkonen-

 

Lähettäjä: MapServer-users <mapserver-users-boun...@lists.osgeo.org> Puolesta Lars Fricke
Lähetetty: torstai 31. maaliskuuta 2022 13.59
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] mapserver OGR does not forward BBOX at all

 

I looked a little deeper and this is the output of the error log (our docker did not distinguish between error and access log putting everything into the terminal).

I hope, someone will notice what is going on? I think it is strange that there are calls to "describeFeature" but no "getFeatrue" at first. And once the "getFeature" is there it is lacking the BBOX.

Thank you guys very much for your effort!!

"""
WFS: Could not find <Parameter name="resultType">
WFS: No transaction support
GDAL: GDALOpen(/var/www/html/ground_reference_values_ni.xml, this=0x56228f49d2c0) succeeds as WFS.
HTTP: Fetch(https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&SRSNAME=EPSG:25832&REQUEST=DescribeFeatureType&TYPENAME=boris:BR_BodenrichtwertZonal,boris:BR_BodenrichtwertLagetypisch,boris:BR_UmrechnungstabelleDatei,boris:BR_UmrechnungstabelleWerte,boris:BR_Verfahren)
HTTP: libcurl/7.68.0 GnuTLS/3.6.13 zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
WFS: Turn off loading of multiple layer definitions at a single time
WFS: https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&SRSNAME=EPSG:25832&REQUEST=DescribeFeatureType&TYPENAME=boris:BR_BodenrichtwertZonal
HTTP: Fetch(https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&SRSNAME=EPSG:25832&REQUEST=DescribeFeatureType&TYPENAME=boris:BR_BodenrichtwertZonal)
WFS: https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=1&SRSNAME=EPSG:25832&REQUEST=GetFeature&TYPENAME=boris:BR_BodenrichtwertZonal
HTTP: Fetch(https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=1&SRSNAME=EPSG:25832&REQUEST=GetFeature&TYPENAME=boris:BR_BodenrichtwertZonal)
NAS: Prescanning /vsimem/tempwfs_0x56228f8b0420/file.gml.
OGR: XMLPlatformUtils::Initialize()
NAS: 1 remaining classes after prescan.

NAS: BR_BodenrichtwertZonal: 1 features.

GDAL: GDALOpen(/vsimem/tempwfs_0x56228f8b0420/file.gml, this=0x56228f86b080) succeeds as NAS.
NAS: Clearing classes.
OGR: XMLPlatformUtils::Terminate()
GDAL: GDALClose(/vsimem/tempwfs_0x56228f8b0420/file.gml, this=0x56228f86b080)
GDAL: GDALClose(/var/www/html/ground_reference_values_ni.xml, this=0x56228f49d2c0)
WFS: Could not find <Parameter name="resultType">
WFS: No transaction support
GDAL: GDALOpen(/var/www/html/ground_reference_values_ni.xml, this=0x56228f452a20) succeeds as WFS.
GDAL: GDALClose(/var/www/html/ground_reference_values_ni.xml, this=0x56228f452a20)
WFS: Could not find <Parameter name="resultType">
WFS: No transaction support
GDAL: GDALOpen(/var/www/html/ground_reference_values_ni.xml, this=0x56228f452a20) succeeds as WFS.
HTTP: Fetch(https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&SRSNAME=EPSG:25832&REQUEST=DescribeFeatureType&TYPENAME=boris:BR_BodenrichtwertZonal,boris:BR_BodenrichtwertLagetypisch,boris:BR_UmrechnungstabelleDatei,boris:BR_UmrechnungstabelleWerte,boris:BR_Verfahren)
WFS: Turn off loading of multiple layer definitions at a single time
WFS: https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&SRSNAME=EPSG:25832&REQUEST=DescribeFeatureType&TYPENAME=boris:BR_BodenrichtwertZonal
HTTP: Fetch(https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&SRSNAME=EPSG:25832&REQUEST=DescribeFeatureType&TYPENAME=boris:BR_BodenrichtwertZonal)
WFS: https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=1&SRSNAME=EPSG:25832&REQUEST=GetFeature&TYPENAME=boris:BR_BodenrichtwertZonal
HTTP: Fetch(https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=1&SRSNAME=EPSG:25832&REQUEST=GetFeature&TYPENAME=boris:BR_BodenrichtwertZonal)
NAS: Prescanning /vsimem/tempwfs_0x56228fa86cb0/file.gml.
OGR: XMLPlatformUtils::Initialize()
NAS: 1 remaining classes after prescan.         

NAS: BR_BodenrichtwertZonal: 1 features.

GDAL: GDALOpen(/vsimem/tempwfs_0x56228fa86cb0/file.gml, this=0x56228feda280) succeeds as NAS.
NAS: Clearing classes.
OGR: XMLPlatformUtils::Terminate()
GDAL: GDALClose(/vsimem/tempwfs_0x56228fa86cb0/file.gml, this=0x56228feda280)
WFS: https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=500&SRSNAME=EPSG:25832&REQUEST=GetFeature&TYPENAME=boris:BR_BodenrichtwertZonal
HTTP: Fetch(https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=500&SRSNAME=EPSG:25832&REQUEST=GetFeature&TYPENAME=boris:BR_BodenrichtwertZonal)
NAS: Prescanning /vsimem/tempwfs_0x56228fa86cb0/file.gml.
OGR: XMLPlatformUtils::Initialize()
NAS: 1 remaining classes after prescan.

NAS: BR_BodenrichtwertZonal: 500 features.

GDAL: GDALOpen(/vsimem/tempwfs_0x56228fa86cb0/file.gml, this=0x56228f9cc6a0) succeeds as NAS.
NAS: Clearing classes.
OGR: XMLPlatformUtils::Terminate()
GDAL: GDALClose(/vsimem/tempwfs_0x56228fa86cb0/file.gml, this=0x56228f9cc6a0)
GDAL: GDALClose(/var/www/html/ground_reference_values_ni.xml, this=0x56228f452a20)
GDAL: GDALDriver::Create(GeoJSON,/vsistdout/,0,0,0,Unknown,(nil))
GDAL: GDALClose(/vsistdout/, this=0x56228fc5ed50)
GDAL: In GDALDestroy - unloading GDAL shared library.        
"""



Am 29.03.22 um 16:05 schrieb Scott:

In your request you have a typeName=tiger:tigerRoads. In your map file the wfs_typename is GROUND_REFERENCE_VALUES_NI_int


On 3/29/22 01:17, Lars Fricke wrote:

Hi,
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).

Mapfile layer definition (sorry I forgot):
LAYER
     NAME "GROUND_REFERENCE_VALUES_NI"
     UNITS METERS
     TYPE POLYGON
     DEBUG  "5"
     CONNECTION "ground_reference_values_ni.xml"
     CONNECTIONTYPE OGR
     STATUS ON
     DATA "boris:BR_BodenrichtwertZonal"
     METADATA
       "wfs_srs" "EPSG:25832"
       "wfs_version"    "1.1.0"
       "wfs_storedquery_id" ""
       "wfs_title"    "GROUND_REFERENCE_VALUES_NI"
       "wfs_connectiontimeout" "30"
       "wfs_typename"    "GROUND_REFERENCE_VALUES_NI_int"
       "wfs_maxfeatures"       "500"
       "gml_include_items" "all"
       "wfs_enable_request" "*"
       "gml_featureid"     "gml_id"

     END # METADATA

     PROJECTION
       "init=epsg:25832"
     END # PROJECTION
     CLASS
       NAME "reference_map"
       STYLE
         OUTLINECOLOR 255 0 0
         WIDTH 0.7
       END # STYLE
     END # CLASS
   END # LAYER

The XML file referenced is in attach.

Best
Lars

Am 29.03.22 um 10:06 schrieb artcliff...@gmail.com:


Hi Lars,

Might this help?

geoserver - WFS and WMS query SRS parameter and BBOX usage - Geographic Information Systems Stack Exchange <https://gis.stackexchange.com/questions/225535/wfs-and-wms-query-srs-parameter-and-bbox-usage>

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.

In their example:

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 <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>

Note the bbox is defined as:
bbox=40.7,-74,40.8,-73,urn:ogc:def:crs:EPSG:4326


If your bbox is the same as the requested projection:
your bbox in the wfs request would be:

BBOX=545592,5806696,548144,5810131,urn:ogc:def:crs: EPSG:25832

Or the epsg code at the end would be whatever units your bbox is in.
Note, the bbox EPSG code can be different than the srsName



*From:* MapServer-users <mapserver-users-boun...@lists.osgeo.org> *On Behalf Of *Lars Fricke
*Sent:* Tuesday, March 29, 2022 12:31 AM
*To:* mapserver-users@lists.osgeo.org
*Subject:* [mapserver-users] mapserver OGR does not forward BBOX at all

Hi All,

First of all, thank you for your support and great work on Mapserver!

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.

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.

The Server is

`https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022?`

The Layer is
`boris:BR_BodenrichtwertZonal`

A direct call from the browser works:

`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 <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>`

I can see in Mapserver log (CONFIG "CPL_DEBUG" "ON"  CONFIG "PROJ_DEBUG" "ON") that the BBOX is missing:

`Fetch(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 <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>)`

By the way, it does not matter if WFS 1.1.0 or 2.0.0 are used.

Trying with ogrinfo:
```
ogrinfo -ro -spat 545592 5806696 548144 5810131 WFS:"https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022" <https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022> "boris:BR_BodenrichtwertZonal"

INFO: Open of `WFS:https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_boris_2022'
      using driver `WFS' successful.
Metadata:
  ABSTRACT=BORIS 2022 WFS by XtraServer
  PROVIDER_NAME=Landesamt für Geoinformation und Landesvermessung Niedersachsen (LGLN) - Landesbetrieb Landesvermessung und Geobasisinformation
  TITLE=BORIS 2022 WFS
ERROR 1: No schema information loaded
Warning 1: NAS: Skipping geometry without feature

Layer name: boris:BR_BodenrichtwertZonal
Metadata:
  TITLE=boris_BR_BodenrichtwertZonal
Geometry: None
Feature Count: 33931
```
There should be some 62 Features in that bbox.

Any help is much appreciated.

Best

Lars



_______________________________________________
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

 


Attachment: OpenPGP_0x667E0B7B73E250FB.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to