> -----Opprinnelig melding----- > Fra: mapserver-users-boun...@lists.osgeo.org > [mailto:mapserver-users-boun...@lists.osgeo.org] På vegne av > Heiko Schröter > Sendt: 15. april 2009 13:52 > Til: mapserver-users@lists.osgeo.org > Emne: [mapserver-users] Use of a Colortable > > Hello,, > > we are mapping global satellite data with postgis. > > Is it possible with mapserver to change the color of the > symbol according to the value read in from postgis ? > Now the color is fixed within the mapfile reading only the > geolocations i.e. > > LAYER > CONNECTION "user=bla password=blub dbname=foo host=fum" > DATA "geocenter from table1" > CLASS > COLOR 50 150 150 > SYMBOL "circle" > SIZE 5 > END > END
You can do something like this: CLASS NAME "Higher than 100" EXPRESSION ([column_name] >= 100 ) COLOR 0 0 0 SYMBOL "circle" SIZE 5 END CLASS NAME "Lower than 100" EXPRESSION ([column_name] < 100 ) COLOR 50 50 50 SYMBOL "circle" SIZE 5 END ... > > My (maybe/probably ill) idea is something like: > ... > DATA "value and geocenter from table1" > ... > COLOR on value using "/dir/my_colortable.dat" > SYMBOL "circle" > ... > > But it looks like that only one coloumn of the GIS Table > could be read for a given LAYER.DATA statement. > > Thanks for any suggestion. > > Regards > Heiko The "geocenter" in the DATA line only defines the geo column in the table. All other columns in table can be accessed with brackets like: [column_name] Regards, Espen > _______________________________________________ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users