Wishing we had COLORRAMPs or something
Bill Binko
bill at BINKO.NET
Wed Jun 29 23:43:39 PDT 2005
On Wed, 29 Jun 2005, Stephen Woodbridge wrote:
> I don't seem to be able to get the color ramp to work, all I get is the
> first color in the ramp.
could you make the default color (the one outside the style) yellow (255
255 0) so that we can tell which default it is picking up?)
>
> The attached images show what I get with the same CONNECTION and DATA
> strings but using classes vs the colorramp. "citem" is an integer from 0
> .. numclasses. Also, I note that I was unable touse %numclasses% on the
> DATARANGE.
>
> I would lobby to have this mechanism be implemented at a global level
> and not on a line by line or item by item basis that it seems to be done
> now this would also facilitate the much requested #include feature. It
> should be doing simple text substitution before any parsing is done so
> any %variable% can just include abitrary text into the mapfile.
>
I don't know why that is not done globally, but I'm going postpone that
discussion until you're working.
Can you please try this simplification?
> LAYER
> NAME "zcta"
> CONNECTIONTYPE postgis
> CONNECTION "..."
> DATA "big honking sql stuff"
>
> TYPE POLYGON
> STATUS ON
> PROJECTION
> #"proj=latlong"
> "init=epsg:4326"
> END
> CLASS
> COLOR 0 204 0
> STYLE
> COLORRANGE 0 255 0 255 0 0
> DATARANGE 1 10
> RANGEITEM "citem"
> END
> OUTLINECOLOR 0 0 0
> END
> END
You also might try 1.0 and 10.0 although that certainly shouldn't make a
difference. Make sure that "citem" is in your "big honking sql stuff".
Let me know what that does. I have an exact replica of that working here.
Do you get any errors?
Bill
More information about the MapServer-users
mailing list