Drawing Raster Query Results
Steve Lime
Steve.Lime at DNR.STATE.MN.US
Mon Apr 23 18:06:55 EDT 2007
>>> On 4/23/2007 at 4:09 PM, in message <462D2097.3050808 at pobox.com>, Frank
Warmerdam <warmerdam at POBOX.COM> wrote:
> Folks,
>
> A couple years ago I implemented support for "query" against a raster layer.
> Such queries essentially return a list of point features, generally one for
> each pixel that satisfies the query criteria.
>
> Recently a user has run into problems when they try to draw a map of the
> query result. This isn't something I've ever tried before, and to be honest,
> I'm a bit vague on how queries are normally used in MapServer. I assumed they
> were mostly used for populating tabular results which does work fine.
Queries result in a feature ID set (as opposed to a cache of actual features) that
can then be used to reference features (as opposed to a bounding box query that
is used to select features for drawing).
> The drawing a query layer for a map result doesn't work properly, as
> documented in:
>
> http://trac.osgeo.org/mapserver/ticket/2069
>
> The question, to my mind, is whether it makes sense to try and draw point
> features from a raster query result on a map, and if we did so how do we
> differentiate styling used for the raster from styling used for the query
> results which are a very different sort of data.
You could use the color specified in the queryMapObj to set pixel values for each
cell stored in the result set. Wouldn't be too hard. If the user is selecting pixels
they should get back yellow pixels in the query map. That's for the "hilite" mode.
Then there's the "selected" mode where only the queried pixels would be displayed.
In effect you'd get a mask which might look cool if there were enough pixels affected.
> I'm tempted to modify msDrawQueryLayer() to do nothing raster layers, but to
> issue a debug message indicating that the layer is being skipped since
> drawing raster query results is considered an unclear request.
I think there are reasonable actions we could take for raster queries. It's more a
matter of priorities I guess. Could always note a desire to address in the future
and punt for now.
> If anyone has an opinion contrary to my idea to disallow this, please let me
> know on this list, or via the ticket.
>
> Best regards,
Steve
More information about the mapserver-dev
mailing list