Skip to content

Commit

Permalink
Filter: support BBOX without PropertyName, as allowed since FE 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Nov 8, 2013
1 parent dc7f35c commit 2d6042e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions mapogcfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,14 +1105,20 @@ void FLTInsertElementInNode(FilterEncodingNode *psFilterNode,
else if ((psEnvelope = CPLGetXMLNode(psXMLNode, "Envelope")))
bCoordinatesValid = FLTParseGMLEnvelope(psEnvelope, &sBox, &pszSRS);

if (pszPropertyName && bCoordinatesValid) {
if (bCoordinatesValid) {
/*set the srs if available*/
if (pszSRS)
psFilterNode->pszSRS = pszSRS;

psFilterNode->psLeftNode = FLTCreateFilterEncodingNode();
psFilterNode->psLeftNode->eType = FILTER_NODE_TYPE_PROPERTYNAME;
psFilterNode->psLeftNode->pszValue = msStrdup(pszPropertyName);
/* PropertyName is optional since FE 1.1.0, in which case */
/* the BBOX must apply to all geometry fields. As we support */
/* currently only one geometry field, this doesn't make much */
/* difference to further processing. */
if( pszPropertyName != NULL ) {
psFilterNode->psLeftNode->pszValue = msStrdup(pszPropertyName);
}

/* coordinates */
psFilterNode->psRightNode = FLTCreateFilterEncodingNode();
Expand Down
2 changes: 1 addition & 1 deletion msautotest
Submodule msautotest updated from 3436c4 to e792f0

0 comments on commit 2d6042e

Please sign in to comment.