Details Ticket 3049


Comment | Reply | Take | Open


Serial Number 3049
Subject ps.map: the color purple
Area grass6
Queue grass
Requestors tutey@o2.pl
Owner none
Status resolved
Last User Contact Sat Jul 23 14:33:20 2005 (3 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Fri Feb 9 07:21:26 2007 (2 yr ago)
Created Tue Mar 1 17:14:35 2005 (3 yr ago)

Transaction History Ticket 3049


Tue, Mar 1 2005 17:14:35    Request created by guest  
Subject: ps.map 

Platform: GNU/Linux/i386
grass obtained from: Mirror of Trento site
grass binary for platform: Compiled from Sources
GRASS Version: grass-6.0.cvs_src_snapshot_2005_02_12

ps.map input=ps2.txt output=map1.ps
ERROR: color purple : illegal color request

although ps.map.html says it is supported:

NAMED COLORS
The following are the colors that are accepted by ps.map:

<snip>
purple
red
violet
white
yellow

Maciek
Tue, Mar 1 2005 21:11:46    Mail sent by mneteler  
ps.map/ps_colors.c

    {"white",   1.00, 1.00, 1.00},
    {"black",   0.00, 0.00, 0.00},
    {"red",     1.00, 0.00, 0.00},
    {"green",   0.00, 1.00, 0.00},
    {"blue",    0.00, 0.00, 1.00},
    {"yellow",  1.00, 1.00, 0.00},
    {"magenta", 1.00, 0.00, 1.00},
    {"cyan",    0.00, 1.00, 1.00},
    {"aqua",     0.00, 0.75, 0.75},
    {"grey",    0.75, 0.75, 0.75},
    {"gray",    0.75, 0.75, 0.75},
    {"orange",  1.00, 0.50, 0.00},
    {"brown",   0.75, 0.50, 0.25},
    {"purple",  0.50, 0.00, 1.00},
    {"violet",  0.50, 0.00, 1.00},
    {"indigo",   0.00, 0.50, 1.00}

Do the other colors of this list work?

Markus
Tue, Mar 1 2005 23:49:18    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Wed, 2 Mar 2005 11:49:00 +1300
From Hamish <hamish_nospam@yahoo.com>
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #3049] (grass) ps.map
Message-Id <20050302114900.253d2395.hamish_nospam@yahoo.com>
In-Reply-To <20050301161435.340201005BB@lists.intevation.de>
References <20050301161435.340201005BB@lists.intevation.de>
X-Mailer Sylpheed version 1.0.0 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.0 tagged_above=-999.0 required=3.0 tests=BAYES_00, FORGED_YAHOO_RCVD
X-Spam-Level
> this bug's URL: http://intevation.de/rt/webrt?serial_num=3049
> ---------------------------------------------------------------------
..
> GRASS Version: grass-6.0.cvs_src_snapshot_2005_02_12
> 
> ps.map input=ps2.txt output=map1.ps
> ERROR: color purple : illegal color request
> 
> although ps.map.html says it is supported:
> 
> NAMED COLORS
> The following are the colors that are accepted by ps.map:
> 
> <snip>
> purple
> red
> violet
> white
> yellow


purple is not a standard GRASS color given by D_color_list(), but is
defined in ps/ps.map/ps_colors.c:

static struct {
    char *name;
    float r, g, b;
} colors[NUM_COLORS] =
{
    {"white",   1.00, 1.00, 1.00},
    {"black",   0.00, 0.00, 0.00},
    {"red",     1.00, 0.00, 0.00},
    {"green",   0.00, 1.00, 0.00},
    {"blue",    0.00, 0.00, 1.00},
    {"yellow",  1.00, 1.00, 0.00},
    {"magenta", 1.00, 0.00, 1.00},
    {"cyan",    0.00, 1.00, 1.00},
    {"aqua",     0.00, 0.75, 0.75},
    {"grey",    0.75, 0.75, 0.75},
    {"gray",    0.75, 0.75, 0.75},
    {"orange",  1.00, 0.50, 0.00},
    {"brown",   0.75, 0.50, 0.25},
    {"purple",  0.50, 0.00, 1.00},
    {"violet",  0.50, 0.00, 1.00},
    {"indigo",   0.00, 0.50, 1.00}
};


my guess is that for some ps.map functions "purple" works, for others it
doesn't.

For consistency & simplicity, we should probably just use standard grass
colors here? Better yet use grass lib functions for colors.

PostScript needs R:G:B as 0.0-1.0 not 0-255, so some scaling is needed.


Hamish


Tue, Mar 1 2005 23:52:37    Subject changed to ps.map: the color purple by hbowman  
Wed, Mar 2 2005 12:06:51    Mail sent by werchowyna@pf.pl  
Return-Path <werchowyna@pf.pl>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <005001c51f18$09b4b0c0$5bd21d3e@eustahiush>
From "Maciek Sieczka" <werchowyna@pf.pl>
To "Markus Neteler via RT" <grass-bugs@intevation.de>
Cc "grass devel" <grass5@grass.itc.it>, "Markus Neteler" <neteler@itc.it>
References <20050301201146.ED46C1005B1@lists.intevation.de>
Subject Re: [bug #3049] (grass) ps.map
Date Wed, 2 Mar 2005 12:00:23 +0100
MIME-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-2"; reply-type=original
Content-Transfer-Encoding 7bit
X-Priority 3
X-MSMail-Priority Normal
X-Mailer Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.2180
X-Antivirus avast! (VPS 0507-3, 2005-02-17), Outbound message
X-Antivirus-Status Clean
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
From: "Markus Neteler via RT" <grass-bugs@intevation.de>
To: <werchowyna@pf.pl>
Subject: [bug #3049] (grass) ps.map


> ps.map/ps_colors.c
> 
>    {"white",   1.00, 1.00, 1.00},
>    {"black",   0.00, 0.00, 0.00},
>    {"red",     1.00, 0.00, 0.00},
>    {"green",   0.00, 1.00, 0.00},
>    {"blue",    0.00, 0.00, 1.00},
>    {"yellow",  1.00, 1.00, 0.00},
>    {"magenta", 1.00, 0.00, 1.00},
>    {"cyan",    0.00, 1.00, 1.00},
>    {"aqua",     0.00, 0.75, 0.75},
>    {"grey",    0.75, 0.75, 0.75},
>    {"gray",    0.75, 0.75, 0.75},
>    {"orange",  1.00, 0.50, 0.00},
>    {"brown",   0.75, 0.50, 0.25},
>    {"purple",  0.50, 0.00, 1.00},
>    {"violet",  0.50, 0.00, 1.00},
>    {"indigo",   0.00, 0.50, 1.00}
> 
> Do the other colors of this list work?

Yes, only purple doesn't.

Maciek


Thu, Mar 3 2005 02:08:36    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Thu, 3 Mar 2005 14:08:19 +1300
From Hamish <hamish_nospam@yahoo.com>
To "Maciek Sieczka" <werchowyna@pf.pl>
Cc grass-bugs@intevation.de, grass5@grass.itc.it
Subject Re: [GRASS5] Re: [bug #3049] (grass) ps.map doesn't like the color purple
Message-Id <20050303140819.6e2d1e2a.hamish_nospam@yahoo.com>
In-Reply-To <005001c51f18$09b4b0c0$5bd21d3e@eustahiush>
References <20050301201146.ED46C1005B1@lists.intevation.de> <005001c51f18$09b4b0c0$5bd21d3e@eustahiush>
X-Mailer Sylpheed version 1.0.0 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.0 tagged_above=-999.0 required=3.0 tests=BAYES_00, FORGED_YAHOO_RCVD
X-Spam-Level
> Subject: [bug #3049] (grass) ps.map doesn't like the color purple
> 
> > ps.map/ps_colors.c
> > 
> >    {"white",   1.00, 1.00, 1.00},
> >    {"black",   0.00, 0.00, 0.00},
> >    {"red",     1.00, 0.00, 0.00},
> >    {"green",   0.00, 1.00, 0.00},
> >    {"blue",    0.00, 0.00, 1.00},
> >    {"yellow",  1.00, 1.00, 0.00},
> >    {"magenta", 1.00, 0.00, 1.00},
> >    {"cyan",    0.00, 1.00, 1.00},
> >    {"aqua",     0.00, 0.75, 0.75},
> >    {"grey",    0.75, 0.75, 0.75},
> >    {"gray",    0.75, 0.75, 0.75},
> >    {"orange",  1.00, 0.50, 0.00},
> >    {"brown",   0.75, 0.50, 0.25},
> >    {"purple",  0.50, 0.00, 1.00},
> >    {"violet",  0.50, 0.00, 1.00},
> >    {"indigo",   0.00, 0.50, 1.00}
> > 
> > Do the other colors of this list work?
> 
> Yes, only purple doesn't.


cyan should break too.


G_color_values() in  lib/gis/named_colr.c lists the above values.


include/colors.h doesn't include those two (and thus they don't show up
in D_color_list() et al.).

If anyone changes MAXCOLORS in colors.h, let me know because I'll have
to redo some of the color=none code in the display modules.



Hamish


Thu, Mar 3 2005 22:50:27    Mail sent by werchowyna@pf.pl  
Return-Path <werchowyna@pf.pl>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <009001c5203b$188f2200$71d21d3e@eustahiush>
From "Maciek Sieczka" <werchowyna@pf.pl>
To "Hamish" <hamish_nospam@yahoo.com>
Cc <grass-bugs@intevation.de>, <grass5@grass.itc.it>
References <20050301201146.ED46C1005B1@lists.intevation.de><005001c51f18$09b4b0c0$5bd21d3e@eustahiush> <20050303140819.6e2d1e2a.hamish_nospam@yahoo.com>
Subject Re: [GRASS5] Re: [bug #3049] (grass) ps.map doesn't like the color purple
Date Thu, 3 Mar 2005 22:45:47 +0100
MIME-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding 7bit
X-Priority 3
X-MSMail-Priority Normal
X-Mailer Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.2180
X-Antivirus avast! (VPS 0507-3, 2005-02-17), Outbound message
X-Antivirus-Status Clean
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
From: "Hamish" <hamish_nospam@yahoo.com>
Sent: Thursday, March 03, 2005 2:08 AM
Subject: Re: [GRASS5] Re: [bug #3049] (grass) ps.map doesn't like the color 
purple


>> > ps.map/ps_colors.c
>> >
>> >    {"white",   1.00, 1.00, 1.00},
>> >    {"black",   0.00, 0.00, 0.00},
>> >    {"red",     1.00, 0.00, 0.00},
>> >    {"green",   0.00, 1.00, 0.00},
>> >    {"blue",    0.00, 0.00, 1.00},
>> >    {"yellow",  1.00, 1.00, 0.00},
>> >    {"magenta", 1.00, 0.00, 1.00},
>> >    {"cyan",    0.00, 1.00, 1.00},
>> >    {"aqua",     0.00, 0.75, 0.75},
>> >    {"grey",    0.75, 0.75, 0.75},
>> >    {"gray",    0.75, 0.75, 0.75},
>> >    {"orange",  1.00, 0.50, 0.00},
>> >    {"brown",   0.75, 0.50, 0.25},
>> >    {"purple",  0.50, 0.00, 1.00},
>> >    {"violet",  0.50, 0.00, 1.00},
>> >    {"indigo",   0.00, 0.50, 1.00}
>> >
>> > Do the other colors of this list work?
>>
>> Yes, only purple doesn't.
>
>
> cyan should break too.

cyan works ok for sure. Here's how I called it:

vlines odra
width 3
color cyan
end

Only purple fails.

Maciek

> G_color_values() in  lib/gis/named_colr.c lists the above values.
>
>
> include/colors.h doesn't include those two (and thus they don't show up
> in D_color_list() et al.).
>
> If anyone changes MAXCOLORS in colors.h, let me know because I'll have
> to redo some of the color=none code in the display modules.
>
> Hamish 


Sat, Jul 23 2005 14:31:47    Area changed to grass6.1 by msieczka  
Sat, Jul 23 2005 14:31:57    User changed to werchowyna@epf.pl by msieczka  
Sat, Jul 23 2005 14:33:20    Mail sent by msieczka  
Chahging area to 6.1, the bug still applies:

ERROR: color purple : illegal color request

Maciek
Wed, Aug 31 2005 20:49:27    Area changed to grass6 by mneteler  
Wed, Jul 26 2006 14:25:25    User changed to tutey@o2.pl by msieczka  
Fri, Feb 9 2007 07:21:26    Status changed to resolved by hbowman  
Fri, Feb 9 2007 07:21:26    Comments added by hbowman  
Fixed some time ago in CVS. (by Cedric?)


Hamish
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request