#3139 closed defect (fixed)
WFS layer returns error if no results in bbox
Reported by: | jimk | Owned by: | assefa |
---|---|---|---|
Priority: | normal | Milestone: | 5.6 release |
Component: | WFS Client | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | |
Cc: | assefa, dmorissette, warmerdam |
Description
msDrawMap(): Image handling error. Failed to draw layer named 'Wetlands'.
msOGRLayerGetItems(): General error message. Assertion failed: OGR layer not opened!!!
This occurs when msWFSLayerWhichShapes finds no shapes and returns MS_DONE instead of opening the OGR layer. This is a delemma because the OGR layer cannot be opened in the case of no GML (mapwfslayer.c:1005 No overlap so nothing to request) or no features in the GML (mapwfslayer.c:1089). However the newer msLayerGetItems code assumes the layer is open to query items.
So... I added a flag (bLayerHasValidGML) to msWFSLayerInfo to indicate if the OGR dataset has been opened. If it is not set, but the WFS layer opened successfully then we are in a VALID case where the WFS request correctly returned no features.
The patch works (because in the core mapserver if msLayerWhichItems() returns MS_DONE no further action is taken on that layer) but is incomplete as the entries in the vtable that go directly to OGR functions should probably also check the bLayerHasValidGML flag before jumping to OGR. (Problems could occur in case of a msLayerGetShape or from mapscript).
Attachments (1)
Change History (6)
by , 15 years ago
Attachment: | mapwfslayer.c.patch added |
---|
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Cc: | added |
---|---|
Milestone: | → 5.6 release |
Owner: | changed from | to
I wish I had time to look into this. I'll assign to Alan to have a look. Unless Assefa or Frank can take it?
follow-up: 5 comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
committed in r9469.
Any comments from anyone? Seems like this needs to be fixed before releasing 5.6.
Steve