extending queries with (php_) mapscript

Daniel Morissette dmorissette at MAPGEARS.COM
Wed Apr 4 13:46:59 EDT 2007


At first sight, this is a small change that can be added to 5.0 without 
a RFC, but would need a tracking bug at a minimum.

A few notes/comments:

- The scenario that you outlined here would also require a 
clearResultCache() method, or am I missing something?

- Currently in PHP MapScript (not sure about other MapScript), the 
resultCacheObj is not exposed directly. Instead, we just expose a 
layerObj.getResult(). Should the addResult() and clearResultCache() be 
added to the layerObj as well or should we consider exposing the 
resultCacheObj in version 5.0? ... um... if we expose the resultCacheObj 
then we may need a RFC.

- Can someone comment on the impact of this on SWIG MapScript?

Daniel

Paul Spencer wrote:
> Hi devs,
> 
> I would like to be able to do some slightly fancier stuff with queries 
> than is currently possible using mapscript.  Specifically, I'd like to 
> be able to extend an existing selection and optionally toggle shapes in 
> the result set.
> 
> I was hoping that simply loading a previously saved query and then 
> querying would do the 'extend' part but it seems queries flush existing 
> results.
> 
> I think what would solve my problem would be to call addResult from 
> (php_) mapscript.  Then I could:
> 
> * load the saved query
> * get the indexes of the existing results
> * flush all results
> * run the new queries
> * get the indexes of the new results and merge them with the existing 
> results
> * flush the results
> * run through the lot and add the results back
> * save the query
> 
> I believe that mapquery.c has the appropriate addResult function so this 
> would be a matter of exposing it in (php_) mapscript and adding the 
> appropriate documentation.
> 
> Would this require an RFC?  Could we get it in for 5.0?  Should I be 
> considering another approach?
> 
> Cheers
> 
> Paul
> 
> +-----------------------------------------------------------------+
> |Paul Spencer                          pspencer at dmsolutions.ca    |
> +-----------------------------------------------------------------+
> |Chief Technology Officer                                         |
> |DM Solutions Group Inc                http://www.dmsolutions.ca/ |
> +-----------------------------------------------------------------+


-- 
Daniel Morissette
http://www.mapgears.com/



More information about the mapserver-dev mailing list