[mapserver-users] Re: creating a dynamic thematic map based on attribs in a Pg table
Mr. Puneet Kishor
punk.kish at gmail.com
Wed Aug 24 11:42:24 PDT 2011
Please see the end of the email for a variation on this problem --
On Aug 24, 2011, at 11:14 AM, Mr. Puneet Kishor wrote:
> I need a tute (or a pointer to one online) on how to color polys in a thematic map based on values retrieved from a separate table. I have
>
> table a
> -------
> gid
> attrib_id
> the_geom
>
> table b
> -------
> attrib_id
> attrib_name
> color_rgb (values such as "242 242 33" and "255 255 0")
>
> I would like to have MS color the polys and name the layers, ideally without having to create the CLASS definitions for each of the 80+ attribs, something akin to
>
> LAYER
> NAME "my layer"
> STATUS ON
> TYPE POLYGON
> CONNECTIONTYPE POSTGIS
> ..
> DATA "the_geom FROM (SELECT gid, the_geom, attrib_name, color_rgb FROM a JOIN b ON a.attrib_id = b.attrib_id) view USING UNIQUE gid"
>
> CLASS
> NAME [attrib_name]
> STYLE
> COLOR [color_rgb]
> OUTLINECOLOR 0 0 0
> END
> END
> END
>
> How do I accomplish something like above?
Instead of getting the attrib name and color from the database, I want to get them from a remote web service. Could something like this be accomplished via SLDs? That is, MapServer requests an SLD from a remote server that tells it how to color each of the classes in the layer.
Many tia.
--
Puneet Kishor
More information about the MapServer-users
mailing list