Wishing we had COLORRAMPs or something

Bill Binko bill at BINKO.NET
Thu Jun 30 22:31:06 PDT 2005


On Thu, 30 Jun 2005, Stephen Woodbridge wrote:

> Bill,
> 
> Looks like the default color (yellow) of the layer is getting applied. 
> 'citem" is getting set ok, because it works just fine with the same SQL 
> using CLASSITEM "citem" and classes. I simplified as you suggested, but 
> no joy.
> 
> OK, got it to work. Had to wrap the OUTLINECOLOR in a separate STYLE ... 
> END block.
> 
> I attached the image. The colorization is not as nice as the class 
> example I posted before. First is the color ramp second mage is the 
> class example.
> 
> -Steve

Well, I'm glad you got it to work, I don't know what to tell you about the 
OUTLINECOLOR...

Perhaps you can tweak this to meet your needs (perhaps 2-3 classes that 
split up the gradient) or provide suggestions on how to improve it.

Bill

> 
> 
> Bill Binko wrote:
> > 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