[gdal-dev] WFS driver bug2 - MAXFEATURES not working
Even Rouault
even.rouault at spatialys.com
Wed Oct 19 06:55:19 PDT 2016
Le mercredi 19 octobre 2016 15:17:52, Odd Ragnar Lydersen a écrit :
> Now I have come around to test this a bit more.
>
> 1) I tried the same as you did, only for wfs v. 1.1.0
>
> ogrinfo -ro
> "WFS:http://demo.mapserver.org/cgi-bin/wfs?VERSION=1.1.0&MAXFEATURES=1"
> continents -al -spat 0 45 15 50 INFO: Open of
> `WFS:http://demo.mapserver.org/cgi-bin/wfs?VERSION=1.1.0&MAXFEATURES=1'
> using driver `WFS' successful.
> Metadata:
> ABSTRACT=This demonstration server showcases MapServer
> (www.mapserver.org) and its OGC support PROVIDER_NAME=Gateway Geomatics
> TITLE=WMS Demo Server for MapServer
>
> Layer name: continents
> Metadata:
> TITLE=World continents
> Geometry: Unknown (any)
> Feature Count: 0
> ...
>
> Not working in version 1.1.0.
Add "-oo CONSIDER_EPSG_AS_URN=YES". MapServer WFS 1.1 returns srsName in
EPSG:XXX form even though it honours EPSG axix order (ie lat, long). But the
OGR GML & WFS readers interpret "EPSG:XXXX" as the old GIS convention (long,
lat order). So here it will let the coordinates in that lat, long order, but
when evaluating the spatial filter on client side, it will discard the feature
as the coordinates are in the wrong order.
Specifying CONSIDER_EPSG_AS_URN=YES will instruct them to interpret EPSG:xxxx
as if it was urn:ogc:def:crs:EPSG::XXXX
Disclaimer: I'm not responsible for the axis order mess :-)
>
> 2) I add the spatial filter to the URL, using BBOX.
>
> ogrinfo -ro
> "WFS:http://demo.mapserver.org/cgi-bin/wfs?VERSION=1.1.0&MAXFEATURES=1&BBO
> X=0,45,15,50" continents -al INFO: Open of
> `WFS:http://demo.mapserver.org/cgi-bin/wfs?VERSION=1.1.0&MAXFEATURES=1&BBO
> X=0,45,15,50' using driver `WFS' successful.
> Metadata:
> ABSTRACT=This demonstration server showcases MapServer
> (www.mapserver.org) and its OGC support PROVIDER_NAME=Gateway Geomatics
> TITLE=WMS Demo Server for MapServer
>
> Layer name: continents
> Metadata:
> TITLE=World continents
> Geometry: Unknown (any)
> Feature Count: 1
> ...
>
> Working in version 1.1.0, when adding BBOX to URL.
Works somehow, but note that the coordinate order is lat,long. Related to the
previous point.
>
> 3) Then I tested this out in our application, and all is well if I read
> GDAL:WFS without really using the C++ api, and just setting up the config
> file with the correct URL-parameters. Both version 1.0.0 and 1.1.0 works.
>
> Shouldn't this work just as well using the C++ API calls, to set up the
> spatial constraints, and maxfeatures? Now I'm rather editing the URL to
> get the result I want, and that is OK, but a bit awkward and cumbersome.
Not sure to understand, but perhaps related to the above issue.
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list