Skip to content

Commit 6beab5e

Browse files
committed
WFS: fix taking into account of wfs_use_default_extent_for_getfeature. Logic added in 7.0.3 was inverted...
1 parent 1534710 commit 6beab5e

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Diff for: mapogcfilter.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ int FLTLayerApplyPlainFilterToLayer(FilterEncodingNode *psNode, mapObj *map,
673673

674674
pszUseDefaultExtent = msOWSLookupMetadata(&(lp->metadata), "F",
675675
"use_default_extent_for_getfeature");
676-
if( pszUseDefaultExtent && CSLTestBoolean(pszUseDefaultExtent) &&
676+
if( pszUseDefaultExtent && !CSLTestBoolean(pszUseDefaultExtent) &&
677677
lp->connectiontype == MS_OGR )
678678
{
679679
const rectObj rectInvalid = MS_INIT_INVALID_RECT;

Diff for: mapogr.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -2429,13 +2429,15 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
24292429
OGR_L_SetSpatialFilter( psInfo->hLayer, hSpatialFilterPolygon );
24302430
OGR_G_DestroyGeometry( hSpatialFilterPolygon );
24312431
}
2432+
2433+
if (layer->debug >= MS_DEBUGLEVEL_VVV)
2434+
{
2435+
msDebug("msOGRFileWhichShapes: Setting spatial filter to %.15g %.15g %.15g %.15g\n", rect.minx, rect.miny, rect.maxx, rect.maxy );
2436+
}
24322437
}
24332438

24342439
psInfo->rect = rect;
24352440

2436-
if (layer->debug >= MS_DEBUGLEVEL_VVV)
2437-
msDebug("msOGRFileWhichShapes: Setting spatial filter to %.15g %.15g %.15g %.15g\n", rect.minx, rect.miny, rect.maxx, rect.maxy );
2438-
24392441
/* ------------------------------------------------------------------
24402442
* Apply an attribute filter if we have one prefixed with a WHERE
24412443
* keyword in the filter string. Otherwise, ensure the attribute

Diff for: mapwfs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2153,7 +2153,7 @@ static int msWFSRunBasicGetFeature(mapObj* map,
21532153

21542154
pszUseDefaultExtent = msOWSLookupMetadata(&(lp->metadata), "F",
21552155
"use_default_extent_for_getfeature");
2156-
if( pszUseDefaultExtent && CSLTestBoolean(pszUseDefaultExtent) &&
2156+
if( pszUseDefaultExtent && !CSLTestBoolean(pszUseDefaultExtent) &&
21572157
lp->connectiontype == MS_OGR )
21582158
{
21592159
const rectObj rectInvalid = MS_INIT_INVALID_RECT;

0 commit comments

Comments
 (0)