Mapserver Color Binding: Blue and Green swapped (bug?)

Frank Warmerdam warmerdam at POBOX.COM
Thu Nov 1 00:13:13 EDT 2007


Delfos, Jacob wrote:
> Hi List
> 
> I am trying to make use of the colour binding feature, and it basically 
> works, except... the colours are not quite right. My colours do not 
> match those in MapInfo, although I can make MapInfo emulate the 
> MapServer colours by swapping blue and green around. So basically: my 
> RGB values are interpreted by MapServer as RBG.
> 
> This happens for polygons as well as lines (haven't tried points). My 
> data has been translated from MapInfo to PostGIS.
> 
> I tried to lodge a bug in Trac, but it says "TICKET_CREATE privileges 
> are required to perform this operation"
> 
> Does anyone know more about this colour problem?

Jacob,

With some pointers from Howard, I found this segment of code in
bindColorAttribute() in maputil.c:

     attribute->red = atoi(tokens[0]);
     attribute->blue = atoi(tokens[1]);
     attribute->green = atoi(tokens[2]);


I think this is responsible.  If you are building from source, try just
changing it to the more obvious organization.  I'd also suggest you
file a bug in Trac on the issue we will see if there is a subtle reason
for this, or it's just a typo.

To file bugs you need an OSGeo Userid.  The pointer to get an osgeo
userid which you can use to login with is under the title "Important
Notice" on the http://trac.osgeo.org/mapserver page.  The same userid
can be used for other OSGeo services like subversion, and other
trac instances (like GDAL's).

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapserver-users mailing list