Wishing we had COLORRAMPs or something

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Wed Jun 29 00:25:47 EDT 2005


Argggh! Doesn't look like it works in the version distributed at MUM3 in 
the workshops.

MapServer version 4.6.0-beta3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG 
OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ 
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
  INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE 
DEBUG=MSDEBUG

because it does not recognized the COLORRANGE

-Steve W.

Bill Binko wrote:
>>Why is this needed? you ask, just make a bunch of classes.
> 
> 
> Mwuu ha ha  (*seang will kill me for this*) 
> 
> Take a look at bug 1305, and see if that will fit your needs.
> 
> It is close, but not exactly what you want.  Most obviously, legend 
> support is non-existant at this point, but I could be motivated to help 
> there if I ever get away from ECW and GeomUnion issues.
> 
> If you're running 4.6, then support is already in there for you. 
> 
> 
>>For a thematic map, you can select the number of breaks you want to 
>>display, between 2 and 10 say. I already have code to compute the class 
>>breaks and to assign them a number between 0 and numclasses, now I need 
>>to a color in the ramp based on numclasses. If your ramp is RED from 0 
>>to 255, and you have a 2 class ramp the 2 will be 255, but if you 
>>display the same thin with a 10 class ramp 10 will be 255 and 2 will be 
>>like 25.5
>>
> 
> 
> In this case, you'd want to do something like this:
> 
> 	CLASS 
> 		COLOR 0 0 0 #mapserver wants a default color 
> 		STYLE
> 			COLORRANGE 0 0 0 255 0 0 #start and end colors
> 			DATARANGE 0 10 #start and end values
> 			RANGEITEM "someField" #the field to use
> 		END
> 	END
> 
> No doubt this is not perfect (it has no "breaks": it is continuous).  
> However, having another user try it and provide feedback (into the bug 
> please) can only help.
> 
> Bill
> 



More information about the mapserver-users mailing list