Opened 12 years ago
Closed 9 years ago
#4434 closed defect (fixed)
Ogrinfo does GetExtent() in a heavy way with WFS driver
Reported by: | Jukka Rahkonen | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Utilities | Version: | unspecified |
Severity: | normal | Keywords: | WFS ogrinfo |
Cc: |
Description
When ogrinfo checks the extents of a WFS data source it makes the GDAL WFS driver to send a GetFeature request for the corresponding feature type. This means reading all the features with all their attributes from the service (unless the number of features will be cut by the server side maxFeatures setting). This can be a slow and heavy operation if the feature type happens to contain a lot of data and network is slow.
Knowing the extents of a data source is not always necassary. It might be good if ogrinfo had an option for skipping the extent resolving for WFS feature types. This could perhaps be done by utilising the bForce parameter as GetExtent(bForce = FALSE).
Change History (5)
comment:1 by , 12 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 12 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
Frank,
ogrinfo -q makes everything quiet : no extent, no feature count, no SRS, no field definition, ... Just features.
Jukka's point is specifically about GetExtent(). The other requests triggered by a "ogrinfo 'WFS:xxxx' -al -so" are reasonably fast and low-bandwidth otherwise.
We've had a bit of discussion about that in the following thread : http://lists.osgeo.org/pipermail/gdal-dev/2012-January/thread.html#31416
I'm not yet sure about the appropriate solution, but we cannot deny the issue.
comment:3 by , 12 years ago
I think it would be a bad thing to litter ogrinfo with commandline options for each possible type of query we might want to suppress. So I continue to feel no action is called for.
comment:4 by , 12 years ago
Could you imagine to make the WFS driver at least to reduce the unnecessary load by doing the GetFeature with &PROPERTYNAME=geometry_column if the ogrinfo parameter -so is used? Now it is fetching all the attribute data as well even the meaning seems to be just to inspect the aggregated extents of geometries. Or would it break the schema interpretation if GDAL does not understand the schema that comes with DescribeFeatureType? With the current behaviour "ogrinfo -so -al" leads on the WFS server side with database backend to SQL query "SELECT * from [all_spatial_tables_in_the_database]".
comment:5 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
ogrinfo has now a -noextent switch
Passing the -q (quiet) switch to ogrinfo will suppress expensive reporting like extents and feature count for layers. I have confirmed that this is documented.