~ubuntu-branches/ubuntu/raring/mapserver/raring-security

« back to all changes in this revision

Viewing changes to mapogcfilter.c

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine, Alan Boudreault, Francesco Paolo Lovergine
  • Date: 2010-03-24 22:13:25 UTC
  • mfrom: (10.2.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100324221325-g9hwfpfqeiq4fz7m
Tags: 5.6.3-1
[ Alan Boudreault ]
* New upstream release, with important bug fixes.
* Fixed some typo in debian/control.

[ Francesco Paolo Lovergine ]
* Policy bumped to 3.8.4 without changes.
* Removed Andreas Putzo among Uploaders: last contribution dated more than
  two years ago.
* Added shapelib to Suggests in mapserver-bin. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**********************************************************************
2
 
 * $Id: mapogcfilter.c 9547 2009-11-13 20:39:50Z assefa $
 
2
 * $Id: mapogcfilter.c 9910 2010-03-03 17:13:44Z assefa $
3
3
 *
4
4
 * Project:  MapServer
5
5
 * Purpose:  OGC Filter Encoding implementation
35
35
#include "mapserver.h"
36
36
#include "mapowscommon.h"
37
37
 
38
 
MS_CVSID("$Id: mapogcfilter.c 9547 2009-11-13 20:39:50Z assefa $")
 
38
MS_CVSID("$Id: mapogcfilter.c 9910 2010-03-03 17:13:44Z assefa $")
39
39
 
40
40
#ifdef USE_OGR
41
41
 
73
73
        if (!bString)
74
74
          return MS_TRUE;
75
75
#else
76
 
        if (msEvalRegex("[-+]?\\b([0-9]*\\.[0-9]+|[0-9]+)\\b", pszValue) == MS_TRUE)
 
76
        if (msEvalRegex("^[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$", pszValue) == MS_TRUE)
77
77
          return MS_TRUE;
78
78
#endif
79
79
    }
633
633
    }
634
634
 
635
635
    psLayer->resultcache = (resultCacheObj *)malloc(sizeof(resultCacheObj));
 
636
    initResultCache(psLayer->resultcache);
636
637
 
637
 
    psLayer->resultcache->results = NULL;
638
 
    psLayer->resultcache->numresults =  0;
639
 
    psLayer->resultcache->cachesize = 0;
640
 
    psLayer->resultcache->bounds.minx = -1;
641
 
    psLayer->resultcache->bounds.miny = -1;
642
 
    psLayer->resultcache->bounds.maxx = -1;
643
 
    psLayer->resultcache->bounds.maxy = -1;
 
638
    /*this will force the queries to retrive the shapes using
 
639
     their unique id #3305*/
 
640
    psLayer->resultcache->usegetshape = MS_TRUE;
644
641
 
645
642
 
646
643
    status = msLayerOpen(psLayer);
662
659
    for (i=0; i<nSize; i++)
663
660
    {
664
661
        msInitShape(&shape);
665
 
        status = msLayerResultsGetShape(psLayer, &shape, -1, anValues[i]);
 
662
        /*status = msLayerResultsGetShape(psLayer, &shape, -1, anValues[i]);*/
 
663
        status = msLayerGetShape(psLayer, &shape, -1, anValues[i]);
666
664
 
667
665
        if (status != MS_SUCCESS)
668
666
          nClassIndex = -1;