[gdal-dev] Re: Are these WFS issues worth filing tickets?

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Tue Jan 10 05:39:27 EST 2012

Even Rouault <even.rouault <at> mines-paris.org> writes:

> > How about having an option -TRUST_GETCAPABILITIES=TRUE and use it as
> > a default value? So number of feature could be examined with
> > resulttype=hits and extents could be taken as they are in the
> > getCapabilities. Or perhaps they could be reported as unknown if
> > reprojecting the lat/lon bounding box feels bad or is
> > inaccurate/impossible? Extents are not always so interesting.
> > 
> I also somehow imagined that. Perhaps you could file a ticket about that,
 so it 
> can be eventually considered later.

After all, such option would not make sense with ogrinfo tool and therefore I
will not make a ticket about it. GetCapabilities is sending fixed information
about the whole layer and that is unusable if user is making selections with
-where, -sql or -spat parameters. In that case the only possibility to get the
desired information is to read the features.

My next bid is to try to teach the users to avoid unintentionally heavy
requests by adding a new paragraph into the WFS driver document page

Using ogrinfo
Ogrinfo tool tries to apply the spatial and attribute filters from the command
line and fetches then data from the WFS service. If no fiters are given this
will lead to reading all features from a WFS data source with a GetFeature
request. This can be a slow operation. Particularly when ogrinfo is used with
the 'all layers' parameter (ogrinfo -al) it will make sequential request for
fetching the contents of each feature type from the whole WFS service. When
exhaustive layer info is not needed the use of special layers WFSLayerMetadata
and WFSGetCapabilities offer a much faster access to WFS service metadata.

My last suggestion is to make third special layer or actually set of special
layers. It could be named as WFSLayerSchema and it would return the schema that
is captured by making a DescribeFeatureType query. Usage might be like "ogrinfo
WFS:server.com/wfs WFSLayerSchema:[featureType]. Now the only way see the shema
is to use the heavy request.


-Jukka Rahkonen-

More information about the gdal-dev mailing list