Symbolizing FeatureQuery
Richard Greenwood
richard.greenwood at GMAIL.COM
Mon Jul 4 18:51:31 PDT 2005
On 7/4/05, David Stajan <dls at informgis.com> wrote:
> On Fri, 1 Jul 2005 03:12:15 +0000, Richard Greenwood
> <richard.greenwood at GMAIL.COM> wrote:
>
> >David Stajan <dls <at> INFORMGIS.COM> writes:
> >
> >>
> >> Hi Group,
> >>
> >> I'm tying to perform theme on theme selections using the cgi
> featurequery
> >> mode. For example I have a polygon layer and a line layer, and I want
> to
> >> select all the lines that fall within a selected polygon. The
> >> featurequery mode works, however I was wondering if there is a way to
> >> symbolize the selected polygon differently from the selected lines in
> the
> >> query map. Right now I get all the selected features (polygon and
> lines)
> >> symbolized in the same color. Even better would be if its possible to
> >> perform this type of query and only have the selected lines returned and
> >> not include the polygon the the query results. Is this possible with
> >> mapserver cgi or can I get this kind of result using some other kind of
> >> method?
> >
> >I have not done exactly what you are trying to do, but I have done
> something
> >similar enough so that I am confident that it can be done easily in CGI
> mode.
> >
> >The lines and polygons are in separate shape files (or PostGIS tables)
> but are
> >symbolized in 2 different layers in the map file; one layer for general
> display
> >and a 2nd layer with a filter to hi-light query results.
> >
> >Pusedo code:
> >1. general polygon display (shows all the polygons, all the time)
> > class w/ symbol for regular display of all features
> >2. general line display
> > class w/ symbol for regular display of all features
> >3. line results (hi-lights selected lines )
> > status default (so it's always displayed)
> > filter %result% (so only query results are displayed
> >
> >I know that's a pretty general answer, but your question is pretty
> general, too.
> >If my response doesn't make sense , follow up with more specifics.
> >
> >Rich
> >
>
> Hey you've come through again Rich, Thanks! I'm not a big fan of having
> all these duplicate layers in the mapfile, as it makes a dynamic layerlist
> a little more challenging. But it seems that's the trick to give
> mapserver a more desktop-like gis feel and functionality. Do you have an
> example of your methodology that I could check out.
>
> Thanks,
>
> DaviD
>
I don't know that "duplicate" layers are the best solution, but it is
not a bad solution. An alternative is multiple map files, and I found
that less appealing. You can check out
www2.tetonwyo.org/mapserver
I do not hold it up as a textbook example, but it is straight CGI and
does a lot of stuff that other people tend to use mapscript to do. I
have kept the site as open as possible so you should be able to fetch
anything of interest off pretty easily. Some browsers have trouble
fetching a map file (anybody know why?) so I can email that to you
directly if necessary.
Rich
--
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com
More information about the MapServer-users
mailing list