[gdal-dev] Are these WFS issues worth filing tickets?
Jukka.Rahkonen at mmmtike.fi
Mon Jan 9 10:36:35 EST 2012
Even Rouault <even.rouault <at> mines-paris.org> writes:
> Selon Jukka Rahkonen <jukka.rahkonen <at> mmmtike.fi>:
> > Hi,
> > Should I file tickets about these findings:
> > - It seems to be difficult to send valid attribute queries with GDAL WFS
> > driver
> > from Windows computers if attribute values contain non-ASCII characters.
> This is a more general issue than with the OGR WFS driver. This is common to all
> command line utilities. Perhaps worth a ticket indeed.
> > - Doing "ogrinfo -al -so" for getting basic information about a WFS server is
> > sending getFeature requests for all the feature types in the whole service.
> > It
> > means that ogrinfo is trying to fetch just evything from the server. It may
> > cause some troubles if WFS server is holding lots of data.
> You can mitigate that by adding MAXFEATURES=xxx . For example :
> ogrinfo -al -so "WFS:http://myserver.com/service/wfs?MAXFEATURES=xxx". The
> MAXFEATURES parameter will be passed to GetFeature requests. This is somehow
> documented in the "Dataset name syntax" of http://gdal.org/ogr/drv_wfs.html :
> The minimal syntax to open a WFS datasource is : WFS:http://path/to/WFS/service
> or http://path/to/WFS/service?SERVICE=WFS
> Additionnal optional parameters can be specified such as TYPENAME, VERSION,
> MAXFEATURES as specified in WFS specification.
I am speaking as one who is running a WFS server. It does not make me
happy that users can use MAXFEATURES if the default is that it is not used. I have
more than 50 featureTypes, several of them containing a few hundred thousand
features and the biggest one has 1.2 million polygons. I do not use maxFeatures
on the server side because a certain point layer with 800000 features is reasonable
for unrestricted getFeature. Still my tiny server is spending nearly 15 minutes for
sending it out.
Doing "ogrinfo -al -so" for my server means reading approximately 500 megabytes
of data through the web and the ogrinfo result is still broken because some
feature types get truncated due to timeout after 15 minutes.
I know that I must be ready to take this because I have decided to run an open WFS
service and anybody can make such requests it they wish. However, I am not sure
if this should be the default behaviour of GDAL. I would rather see that folks should
be active before they hurt my service and other users with GDAL.
How about setting MAXFEATURES to, let's say, at maximum 5000 by default?
By comparison, GDAL WFS driver itself seems to use only 100 features as a
default page size if PagingAllowed is selected.
For those who do not know, ogrinfo wants to read the whole feature type so
it can calculate the exact bounds of the dataset. Data are not stored and if user
selects to fetch the data for local use another getFeature must be fired.
More information about the gdal-dev