Ticket #4434 (reopened defect)

Opened 17 months ago

Last modified 17 months ago

Ogrinfo does GetExtent() in a heavy way with WFS driver

Reported by: jratike80 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

Changed 17 months ago by warmerdam

  • keywords changed from WFS ogrinfo to WFS ogrinfo
  • status changed from new to closed
  • resolution set to worksforme

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.

Changed 17 months ago by rouault

  • status changed from closed to reopened
  • resolution worksforme deleted

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.

Changed 17 months ago by warmerdam

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.

Changed 17 months ago by jratike80

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]".

Note: See TracTickets for help on using tickets.