Using Attributes
Blammo
bob.basques at CI.STPAUL.MN.US
Tue Dec 14 18:07:46 PST 2004
All,
Ok, then. Let's forget a static color value for the time being. What
about a color ramp. Can a color ramp be used somehow (without going a
database route, or using MapScript) to color a set of polygons based on
some value in a column, or even simply divide the number of Polygons
(or entities) into the color ramp and color them based on sorting.
Anything, to get a varied color range for neighboring polygons.
I'm just trying to color the polygons uniquely is all. I actually added
in the column for coloring thinking it to be a simple operation for
MapServer. I did it as a 7 color Ramp that I applied by sorting the
names alphabetically. I can add in the 7 classes needed to do it easy
enough the long way. It will just look really weird going at it
backwards, especially when I have to explain to some mapserver admin in
the future that installs a new version and asks me why I'm macthing the
RGB values in the Attribute to populate the CLASS with the same values.
Don't you think?
I guess I'm just getting (too) used to MapServer being able to do
everything I ask of it. I guess I need to watch my step. :c)
Stephen Woodbridge wrote:
>Ken or Bob,
>
>This sounds like a reasonable feature request. You should write an
>enhancement request bug in bugzilla.
>
>
Done.
Thanks for the help. I added in the bug enhancement per your
suggestion. I hope I didn't keep it too short and simple though.
bobb
>-Steve
>
>Ken Lord wrote:
>
>
>>Hi Bob,
>>
>>Unless things have changed in the last year, you can't do it the way
>>you want to with shapefiles. ... I do hope things have changed.
>>
>>
>>
>>
>>>All,
>>>
>>>I have a SHP file with a "COLOR" column in it with a RGB value (255 255
>>>255).
>>>
>>>How do I use this in the MAPFILE as a COLOR value?
>>>
>>>I've been looking on and off all day in the Wiki, I've come to the
>>>conclusion that I'm not using the correct Search term. Does anyone have
>>>an example of how to use the column attribute value as the color value
>>>in the MAPFILE?
>>>
>>>LAYER
>>>NAME 'cities'
>>>DATA '<path to data>'
>>>STATUS DEFAULT
>>>CLASSITEM 'MUNI_NAME'
>>>CLASS
>>> OUTLINECOLOR 207 50 150
>>> COLOR '<value of muni_name column above>'
>>> SIZE 2
>>> SYMBOL 'circle'
>>>END
>>>END
>>>
>>>I think I'm having a brain freeze or something . . . . . mutter, mutter
>>>. . . .
>>>
>>>bobb
>>>
>>>
>>>
>>
>>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20041214/647eaa70/attachment.htm>
More information about the MapServer-users
mailing list