[mapserver-dev] Advanced Selection Management API

Steve Lime Steve.Lime at state.mn.us
Mon Dec 7 18:13:21 EST 2009


Thinking about this from the query file point of view you can do all of this except for modifying
a result set. The 5.6 code actually caches a query parameters in a query file rather than an id
list in the past. It's faster for many data providers just to redo a query than deal with the get
feature by id queries. I've used the new query file to persist query results and it works fine.

Modifying a selection set would require some sort of disk serialization as you suggest. It would be
cool to be able to serialize a query as a data set (as opposed to just the parameters) and then
support operations against that data set based on other queries (subtraction or addition). 
You'd draw the data just like any other layer. Using query results (either stock MapServer or
WFS) as a way to create, add or remove features from a selection set would be pretty convenient.

I think this would be a desirable addition.  I do wonder if a shapefile is flexible enough though 
given things like DBF size and type limitations...

Steve

>>> On 12/7/2009 at 12:43 PM, in message
<14FB35AD-D104-4755-AEE5-73DB0FD2DAD9 at dmsolutions.ca>, Paul Spencer
<pspencer at dmsolutions.ca> wrote:
> We have a customer for which there is a need for some more advanced selection 
> management functionality.  The basic requirements are:
> 
> * create a new selection from a set of features selected spatially or by 
> some combination of attributes
> * save a named selection (serialize to disk file)
> * restore a previously saved selection (deserialize from disk file)
> * modify a selection by adding or removing features selected spatially or by 
> some combination of attributes
> * highlight a selection when drawing using the CGI (like referencing a .qy 
> file)
> * access features in the selection for other aspects of the application
> 
> My questions:
> 
> 1) is this achievable with the current setup?  I don't think so, the only 
> way I can think to do this is to use mapscript to create shapefiles of 
> selected features and manage selection as separate datasources and layers
> 
> 2) is this something that would be desirable to have in mapserver/mapscript 
> or should I just look at doing my own thing on the side?
> 
> 
> Cheers
> 
> Paul
> __________________________________________
> 
>    Paul Spencer
>    Chief Technology Officer
>    DM Solutions Group Inc
>    http://research.dmsolutions.ca/ 
> 
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev



More information about the mapserver-dev mailing list