<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [UMN_MAPSERVER-USERS] Mapserver Color Binding: Blue and Greenswapped (bug?)</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Thanks, Frank. I think that must be where it goes wrong.<BR>
<BR>
I tried to get an OSGeo userid (I used to have one, but it forgot me), but it won't let me. The form says my userid has been created, but it rejects it upon login. If I use the &quot;forgotten password&quot; functionality it doesn't recognise my email address.<BR>
<BR>
I don't think I'd know how to compile mapserver and mapscript from scratch (haven't tried it for a few years), but there may be someone here who can. I will investigate that.<BR>
<BR>
regards,<BR>
<BR>
Jacob<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Frank Warmerdam [<A HREF="mailto:warmerdam@pobox.com">mailto:warmerdam@pobox.com</A>]<BR>
Sent: Thu 11/1/2007 13:13<BR>
To: Delfos, Jacob<BR>
Cc: MAPSERVER-USERS@LISTS.UMN.EDU<BR>
Subject: Re: [UMN_MAPSERVER-USERS] Mapserver Color Binding: Blue and Greenswapped (bug?)<BR>
<BR>
Delfos, Jacob wrote:<BR>
&gt; Hi List<BR>
&gt;<BR>
&gt; I am trying to make use of the colour binding feature, and it basically<BR>
&gt; works, except... the colours are not quite right. My colours do not<BR>
&gt; match those in MapInfo, although I can make MapInfo emulate the<BR>
&gt; MapServer colours by swapping blue and green around. So basically: my<BR>
&gt; RGB values are interpreted by MapServer as RBG.<BR>
&gt;<BR>
&gt; This happens for polygons as well as lines (haven't tried points). My<BR>
&gt; data has been translated from MapInfo to PostGIS.<BR>
&gt;<BR>
&gt; I tried to lodge a bug in Trac, but it says &quot;TICKET_CREATE privileges<BR>
&gt; are required to perform this operation&quot;<BR>
&gt;<BR>
&gt; Does anyone know more about this colour problem?<BR>
<BR>
Jacob,<BR>
<BR>
With some pointers from Howard, I found this segment of code in<BR>
bindColorAttribute() in maputil.c:<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp; attribute-&gt;red = atoi(tokens[0]);<BR>
&nbsp;&nbsp;&nbsp;&nbsp; attribute-&gt;blue = atoi(tokens[1]);<BR>
&nbsp;&nbsp;&nbsp;&nbsp; attribute-&gt;green = atoi(tokens[2]);<BR>
<BR>
<BR>
I think this is responsible.&nbsp; If you are building from source, try just<BR>
changing it to the more obvious organization.&nbsp; I'd also suggest you<BR>
file a bug in Trac on the issue we will see if there is a subtle reason<BR>
for this, or it's just a typo.<BR>
<BR>
To file bugs you need an OSGeo Userid.&nbsp; The pointer to get an osgeo<BR>
userid which you can use to login with is under the title &quot;Important<BR>
Notice&quot; on the <A HREF="http://trac.osgeo.org/mapserver">http://trac.osgeo.org/mapserver</A> page.&nbsp; The same userid<BR>
can be used for other OSGeo services like subversion, and other<BR>
trac instances (like GDAL's).<BR>
<BR>
Best regards,<BR>
--<BR>
---------------------------------------+--------------------------------------<BR>
I set the clouds in motion - turn up&nbsp;&nbsp; | Frank Warmerdam, warmerdam@pobox.com<BR>
light and sound - activate the windows | <A HREF="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam</A><BR>
and watch the world go round - Rush&nbsp;&nbsp;&nbsp; | President OSGeo, <A HREF="http://osgeo.org">http://osgeo.org</A><BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>