[Mapserver-users] Point color by attribute
Sean Gillies
sgillies at frii.com
Sun Feb 23 10:07:14 PST 2003
On Sunday, February 23, 2003, at 08:08 AM, Gerry Creager N5JXS wrote:
> OK, so the subject's not real clear.
>
> I would like to be able to change the color attribute of a point
> object in the mapfile based on a value retrieved from postgres. Can I
> do something like this without dynamically rebuilding the mapfile
> every time I access the database?
>
> Specifically, when I'm building the shapefile, I'd like to have the
> various points associated with a layer vary depending on their value,
> as placed in the dbf.
>
> In the link below, highlight 'Precip. Water Vapor' to see the values.
> I'd like to make that selection A) display a point that is B) varied
> in color with relation to the value of the PWV parameter.
>
> http://mesodev.met.tamu.edu//cgi-bin/
> mapserv?map=%2Fvar%2Fwww%2Fmesonet%2Ftexas%2Fmesonet.map&layer=weather-
> metar&layer=weather-mtemp&layer=weather-mlabel&layer=weather-
> mdew&layer=weather-barbs&zoomsize=2&program=%2Fcgi-
> bin%2Fmapserv&map_web_imagepath=%2Fvar%2Fwww%2Fmesonet%2Ftmp%2F&map_web
> _imageurl=%2Ftmp%2F
>
> Thanks, Gerry
> --
> Gerry Creager -- gerry.creager at tamu.edu
> Texas Mesonet -- AATLT, Texas A&M University
> Cell: 979.229.4301 Office: 979.458.4020 FAX: 979.847.8578
> Page: 979.228.0173
> Office: 903A Eller Bldg, TAMU, College Station, TX 77843
>
>
Gerry,
Because a layer can only have a single connection type, you can't
define the features in a shapefile and then classify them based
on an attribute from another database.
Am I understanding your situation?
Put your features into Postgres and use the PostGIS connector, or
add a PWV attribute to your DBF files and then use classes with
your layer to draw points with different value-specific styles.
Hope this helps,
Sean
--
Sean Gillies
sgillies at frii.com
http://www.frii.com/~sgillies
More information about the MapServer-users
mailing list