Joining another table in a PostGIS layer for CLASS

Kenton Williams Kenton_Williams at UMIT.MAINE.EDU
Tue Mar 28 14:24:50 EST 2006


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.



More information about the mapserver-users mailing list