Skip to content
Permalink
Browse files

WFS: fix taking into account of wfs_use_default_extent_for_getfeature…

…. Logic added in 7.0.3 was inverted...
  • Loading branch information
rouault committed Dec 19, 2016
1 parent 1534710 commit 6beab5e455fd4d0c4292bd5cf77655617a1dae2f
Showing with 7 additions and 5 deletions.
  1. +1 −1 mapogcfilter.c
  2. +5 −3 mapogr.cpp
  3. +1 −1 mapwfs.c
@@ -673,7 +673,7 @@ int FLTLayerApplyPlainFilterToLayer(FilterEncodingNode *psNode, mapObj *map,

pszUseDefaultExtent = msOWSLookupMetadata(&(lp->metadata), "F",
"use_default_extent_for_getfeature");
if( pszUseDefaultExtent && CSLTestBoolean(pszUseDefaultExtent) &&
if( pszUseDefaultExtent && !CSLTestBoolean(pszUseDefaultExtent) &&
lp->connectiontype == MS_OGR )
{
const rectObj rectInvalid = MS_INIT_INVALID_RECT;
@@ -2429,13 +2429,15 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
OGR_L_SetSpatialFilter( psInfo->hLayer, hSpatialFilterPolygon );
OGR_G_DestroyGeometry( hSpatialFilterPolygon );
}

if (layer->debug >= MS_DEBUGLEVEL_VVV)
{
msDebug("msOGRFileWhichShapes: Setting spatial filter to %.15g %.15g %.15g %.15g\n", rect.minx, rect.miny, rect.maxx, rect.maxy );
}
}

psInfo->rect = rect;

if (layer->debug >= MS_DEBUGLEVEL_VVV)
msDebug("msOGRFileWhichShapes: Setting spatial filter to %.15g %.15g %.15g %.15g\n", rect.minx, rect.miny, rect.maxx, rect.maxy );

/* ------------------------------------------------------------------
* Apply an attribute filter if we have one prefixed with a WHERE
* keyword in the filter string. Otherwise, ensure the attribute
@@ -2153,7 +2153,7 @@ static int msWFSRunBasicGetFeature(mapObj* map,

pszUseDefaultExtent = msOWSLookupMetadata(&(lp->metadata), "F",
"use_default_extent_for_getfeature");
if( pszUseDefaultExtent && CSLTestBoolean(pszUseDefaultExtent) &&
if( pszUseDefaultExtent && !CSLTestBoolean(pszUseDefaultExtent) &&
lp->connectiontype == MS_OGR )
{
const rectObj rectInvalid = MS_INIT_INVALID_RECT;

0 comments on commit 6beab5e

Please sign in to comment.
You can’t perform that action at this time.