Wishing we had COLORRAMPs or something

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Thu Jun 30 21:28:58 EDT 2005


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


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
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: colorramp2.png
Type: image/png
Size: 24992 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050630/846581c4/colorramp2.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: classes.png
Type: image/png
Size: 27491 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050630/846581c4/classes.png


More information about the mapserver-users mailing list