[gdal-dev] Re: Ogr2ogr, WFS 1.1.0, -spat and gml:Box

Even Rouault even.rouault at mines-paris.org
Mon Jan 9 05:30:37 EST 2012


Selon Jukka Rahkonen <jukka.rahkonen at mmmtike.fi>:

> Even Rouault <even.rouault <at> mines-paris.org> writes:
>
>
> > > So it is WFS 1.1.0 request with the BBOX filter. But is it OK to give
> BBOX
> > > as GML2 gml:Box if the service is WFS version 1.1.0? I have been thinking
> > > it should be using GML3 and gml:Envelope instead.
> >
> > I suppose you're right. I didn't recall all the details, so I had a look at
> > the code, and here's the answer :
> >
> >     /* This is a heuristic to detect Deegree 3 servers, such as */
> >     /* http://deegree3-demo.deegree.org:80/deegree-utah-demo/services */
> >     /* that are very GML3 strict, and don't like <gml:Box> in a
> <Filter><BBOX>
> > */
> >     /* request, but requires instead <gml:Envelope>, but some servers (such
> as
> > MapServer) */
> >     /* don't like <gml:Envelope> so we are obliged to detect the kind of
> > server */
> >
> > So basically it seems that most servers are tolerant and will accept
> gml:Box.
> > But some servers that should accept gml:Envelope don't. So the default
> > behaviour is to use gml:Box, except in cases where we know it won't be
> > accepted (but the server mentionned in the comment is no longer online, and
> I
> > cannot find another one that doesn't accept <gml:Box>)
> >
> > It would perhaps be more reasonable to implement the reversed logic from a
> > theoretical point of view, but unless you can point me to a server that
> > doesn't like the current logic, I'm quite hesitant to change that
>
> Hi,
>
> The deegree3 demos can be found here http://demo.deegree.org/ and the Utah
> demo
> seems to be at http://deegree3-demo.deegree.org:80/utah-workspace/services
> I had a quick test and it did not complain about using <gml:Box> in <Filter>.
> The result looks like correct, too.  So perhaps we can conclude that using
> <gml:Box> with WFS 1.1.0 filters is probably wrong but because it works then
> it
> will not be fixed.
>
> I do not really like this ambiguous behaviour, though. Now for example WFS
> 1.1.0
> bounding box guery with GDAL and EPSG:4236 leads to a mixture of using GML2
> <gml:Box> that does not exist in GML3 but with a GML3 style Northing-Easting
> coordinate order. However, normal GDAL user does not ever see it without
> sniffing the web traffic and there is really nothing new with WFS being
> ambiguos
> so perhaps I just need to take everything that is added to the stew and try
> to
> remember all the tricks and pecularities while waiting for some comfortable
> vector delivery service to appear.

Jukka,

I'm just curious : is there an reason for you to look at what exact requests the
OGR WFS driver sends to the server ? Does it cause practical problems with a
server I would not have tested against ? If so, that might be worth
reconsidering the implementation and make gml:Envelope the default for WFS 1.1
(and in case of a buggy server fallback to gml:Box if needed. I should have
noted which server didn't like gml:Envelope ...), instead of the current logic
which is the reverse.

Best regards,

Even


More information about the gdal-dev mailing list