Joining another table in a PostGIS layer for CLASS
Matthew Perry
perrygeo at GMAIL.COM
Tue Mar 28 11:29:57 PST 2006
Kenton,
You'll have to put that query below into a sub-query in the DATA
stament. Check out
http://postgis.refractions.net/docs/ch04.html#id2789268 for the
details.
matt
On 3/28/06, Kenton Williams <Kenton_Williams at umit.maine.edu> wrote:
> So, am I safe in assuming that the format would be something like this in my Layer definition:
>
> CONNECTIONTYPE postgis
> CONNECTION "user=the_user dbname=the_db host=localhost"
> DATA "a.the_geom as the_geom, a.Name as town_name, b.Class FROM towns a LEFT JOIN classes b ON a.Name=b.Name"
> CLASSITEM "Class"
>
> And then in the Layer's Class definition:
>
> CLASS
> NAME "Class 2"
> EXPRESSION "2"
> COLOR 255 178 0
> OUTLINECOLOR 0 0 0
> END
>
> Does all of this look legal?
>
> I'll try it when I get my PostGIS database back up and running.
>
> Kenton W.
>
>
--
Matt Perry
perrygeo at gmail.com
http://www.perrygeo.net
More information about the MapServer-users
mailing list