Details Ticket 4037


Comment | Reply | Take | Open


Serial Number 4037
Subject d.vect.thematic: fails to generate a legend for >20 custom_breaks
Area grass6
Queue grass
Requestors tutey@o2.pl
Owner none
Status resolved
Last User Contact Mon Jan 29 09:07:43 2007 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Mon Jan 29 09:07:43 2007 (2 yr ago)
Created Tue Jan 24 14:29:46 2006 (3 yr ago)

Transaction History Ticket 4037


Tue, Jan 24 2006 14:29:46    Request created by guest  
Subject: d.vect.thematic: fails to generate a legend for >20 custom_breaks

Platform: GNU/Linux/x86
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: cvs 2005.01.10

d.vect.thematic map=rogow_parcels_01 type=area column=CODE themetype=graduated_colors
themecalc=custom_breaks 'breakpoints=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
18 19 20 21' layer=1 icon=basic/circle size=5 maxsize=20 nint=4 colorscheme=green-red
pointcolor=255:128:1 linecolor=0:0:0 startcolor=255:128:255 endcolor=255:255:255
monitor=x1 -l 


**************************************************




Thematic map legend for column CODE of map rogow_parcels_01

Value range:  1.000000 -  666.000000

Color(R:G:B)	Value
============	==========
0:255:0		1 - 2 
13:242:0		2 - 3 
26:229:0		3 - 4 
39:216:0		4 - 5 
52:203:0		5 - 6 
65:190:0		6 - 7 
78:177:0		7 - 8 
91:164:0		8 - 9 
104:151:0		9 - 10 
117:138:0		10 - 11 
130:125:0		11 - 12 
143:112:0		12 - 13 
156:99:0		13 - 14 
169:86:0		14 - 15 
182:73:0		15 - 16 
195:60:0		16 - 17 
208:47:0		17 - 18 
221:34:0		18 - 19 
234:21:0		19 - 20 
255:0:0		20 - 21 



GRASS_INFO_WARNING(3623,1): Problem parsing command [8 -1]

GRASS_INFO_WARNING(3623,2): Problem parsing command [5 -1]



>20 custom_breaks are supported in general. Only that -l switch cannot be used
along.

Maciek
Thu, Jan 26 2006 06:55:23    Mail sent by dca.gis@gmail.com  
Return-Path <dca.gis@gmail.com>
Delivered-To grass-bugs@lists.intevation.de
DomainKey-Signature a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=E11xz6fXgkfQ9GZywmrrsXkoLgEooJBnfJMuxOsKPdfLx/ax3xaclQvR2SlFmS6sDlZuJxsNj4r6k9+o9/AbPZUZOm1hoIQbbuK6HTs1F0fAe81jdkg48KrgEpHjQRh2Cb7kd0kdw7l6oNhRLyJwArl8QLMwHKTUN+vbJL4lcTM=
Message-ID <1a486f560601252155y31ca2e76od37f992cc4b0da8f@mail.gmail.com>
Date Thu, 26 Jan 2006 00:55:19 -0500
From Daniel Calvelo <dca.gis@gmail.com>
To Request Tracker <grass-bugs@intevation.de>
Subject Re: [GRASS5] [bug #4037] (grass) d.vect.thematic: fails to generate a legend for >20 custom_breaks
Cc grass5@grass.itc.it
In-Reply-To <20060124132946.87F8E1005C2@lists.intevation.de>
MIME-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Content-Disposition inline
References <20060124132946.87F8E1005C2@lists.intevation.de>
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
[Maciek found a misspecification in d.vect.thematic: the
legend-drawing code is designed for a small number of categories;
going from 20 up, it feeds negative coordinates into d.graph, which
chokes and spits]

What is the right solution?

a) allow >20 items in the legend, shrinking it to fit all of them
b) make the legend with only 20 items (say the 10 lower, a mark and
the 10 upper) with a warning
c) signal >20 items as an error or warning and do not output the legend
d) other suggestion

I like b). c) is of course the easiest. a) is a little involved (since
this is sh) and it would allow for legends of arbitrary number of
items, which makes unreadably absurd legends possible.

Daniel.

-- Daniel Calvelo Aros


Thu, Jan 26 2006 15:37:07    Mail sent by michael.barton@asu.edu  
Return-Path <Michael.Barton@asu.edu>
Delivered-To grass-bugs@lists.intevation.de
Date Thu, 26 Jan 2006 07:31:53 -0700
From Michael Barton <michael.barton@asu.edu>
Subject Re: [GRASS5] [bug #4037] (grass) d.vect.thematic: fails to generate a legend for >20 custom_breaks
In-reply-to <1a486f560601252155y31ca2e76od37f992cc4b0da8f@mail.gmail.com>
To Daniel Calvelo <dca.gis@gmail.com>, Paolo Cavallini via RT <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Message-id <BFFE2B6A.86DE%michael.barton@asu.edu>
MIME-version 1.0
Content-type text/plain; charset=US-ASCII
Content-transfer-encoding 7bit
User-Agent Microsoft-Entourage/11.2.1.051004
Thread-Topic [GRASS5] [bug #4037] (grass) d.vect.thematic: fails to generate a legend for >20 custom_breaks
Thread-Index AcYihUA3fxIIHI54Edq/ygAKlW/i4A==
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
Thanks for fixing this Daniel. The legend is very restricted due to the
limitations of d.graph. (b) sounds like the best to me also.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton



> From: Daniel Calvelo <dca.gis@gmail.com>
> Date: Thu, 26 Jan 2006 00:55:19 -0500
> To: Request Tracker <grass-bugs@intevation.de>
> Cc: <grass5@grass.itc.it>
> Subject: Re: [GRASS5] [bug #4037] (grass) d.vect.thematic: fails to generate
a
> legend for >20 custom_breaks
> 
> [Maciek found a misspecification in d.vect.thematic: the
> legend-drawing code is designed for a small number of categories;
> going from 20 up, it feeds negative coordinates into d.graph, which
> chokes and spits]
> 
> What is the right solution?
> 
> a) allow >20 items in the legend, shrinking it to fit all of them
> b) make the legend with only 20 items (say the 10 lower, a mark and
> the 10 upper) with a warning
> c) signal >20 items as an error or warning and do not output the legend
> d) other suggestion
> 
> I like b). c) is of course the easiest. a) is a little involved (since
> this is sh) and it would allow for legends of arbitrary number of
> items, which makes unreadably absurd legends possible.
> 
> Daniel.
> 
> -- Daniel Calvelo Aros
> 


Thu, Jan 26 2006 16:57:20    Mail sent by michael.barton@asu.edu  
Return-Path <Michael.Barton@asu.edu>
Delivered-To grass-bugs@lists.intevation.de
Date Thu, 26 Jan 2006 08:54:52 -0700
From Michael Barton <michael.barton@asu.edu>
Subject Re: [GRASS5] [bug #4037] (grass) d.vect.thematic: fails to generate a legend for >20 custom_breaks
In-reply-to <1a486f560601252155y31ca2e76od37f992cc4b0da8f@mail.gmail.com>
To Daniel Calvelo <dca.gis@gmail.com>, Paolo Cavallini via RT <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Message-id <BFFE3EDC.1DB24%michael.barton@asu.edu>
MIME-version 1.0
Content-type text/plain; charset=US-ASCII
Content-transfer-encoding 7bit
User-Agent Microsoft-Entourage/11.2.1.051004
Thread-Topic [GRASS5] [bug #4037] (grass) d.vect.thematic: fails to generate a legend for >20 custom_breaks
Thread-Index AcYikNfuFjquJo6EEdqEXAAUUSYxwg==
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
Daniel and others,

Thinking about this on the commute to work this morning, I came up with an
idea for a longer-term way to deal with vector thematic mapping and legends.
For vectors, I can't think of a situation where a legend is NOT used for
some kind of thematic mapping, even if there is a legend item for each
vector object. That is, it is somewhat different from raster legends for
floating point maps. So here is my idea that builds on the unique
multi-layer vector architecture for GRASS.

Each vector file would get a special layer (call it the "T" layer for this
exercise) for thematic mapping. It also would get a special attribute table
(call it "vtheme" for the sake of argument). The T layer and vtheme table
are generated for every vector file on creation. Default cats for the T
layer are simply 1 for each vector item and vtheme is empty except for cats.
The vtheme table would minimally contain the following fields:

psize (point size)
lwidth (line width)
lcolor (line color)
fcolor (fill color)
tlabel (thematic vector label)

It could also contain some topology placeholder fields like length (line
length) or area.

d.vect.thematic (hopefully a C version of it) would repopulate the T layer
so that each vector object gets a cat indicating its membership in a
thematic class. The vtheme table would be populated by parameters generated
by d.vect.thematic (and optionally by other modules like v.to.db for
topology)

Any legend-generating program (an enhanced version of d.legend, a new
d.vect.legend, or even a GUI) could easily obtain the information needed to
create a nice legend using v.db.select.

What do you think?

Michael
______________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ  85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton


> From: Daniel Calvelo <dca.gis@gmail.com>
> Date: Thu, 26 Jan 2006 00:55:19 -0500
> To: Request Tracker <grass-bugs@intevation.de>
> Cc: <grass5@grass.itc.it>
> Subject: Re: [GRASS5] [bug #4037] (grass) d.vect.thematic: fails to generate
a
> legend for >20 custom_breaks
> 
> [Maciek found a misspecification in d.vect.thematic: the
> legend-drawing code is designed for a small number of categories;
> going from 20 up, it feeds negative coordinates into d.graph, which
> chokes and spits]
> 
> What is the right solution?
> 
> a) allow >20 items in the legend, shrinking it to fit all of them
> b) make the legend with only 20 items (say the 10 lower, a mark and
> the 10 upper) with a warning
> c) signal >20 items as an error or warning and do not output the legend
> d) other suggestion
> 
> I like b). c) is of course the easiest. a) is a little involved (since
> this is sh) and it would allow for legends of arbitrary number of
> items, which makes unreadably absurd legends possible.
> 
> Daniel.
> 
> -- Daniel Calvelo Aros
> 


Thu, Jan 26 2006 17:05:22    Mail sent by mlennert@club.worldonline.be  
Return-Path <mlennert@club.worldonline.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <43D8E0BB.2040300@club.worldonline.be>
Date Thu, 26 Jan 2006 15:46:19 +0100
From Moritz Lennert <mlennert@club.worldonline.be>
User-Agent Debian Thunderbird 1.0.7 (X11/20051017)
X-Accept-Language en-us, en
MIME-Version 1.0
To Michael Barton <michael.barton@asu.edu>
Cc Daniel Calvelo <dca.gis@gmail.com>, Paolo Cavallini via RT <grass-bugs@intevation.de>, grass5@grass.itc.it
Subject Re: [GRASS5] [bug #4037] (grass) d.vect.thematic: fails to generate a legend for >20 custom_breaks
References <BFFE2B6A.86DE%michael.barton@asu.edu>
In-Reply-To <BFFE2B6A.86DE%michael.barton@asu.edu>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
Michael Barton wrote:
> Thanks for fixing this Daniel. The legend is very restricted due to the
> limitations of d.graph. (b) sounds like the best to me also.


Should the psmap legend file correspond to the displayed legend ? This 
would have to be changed also, then.

Moritz


Thu, Jan 26 2006 23:46:06    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Fri, 27 Jan 2006 11:45:27 +1300
From Hamish <hamish_nospam@yahoo.com>
To Michael Barton <michael.barton@asu.edu>
Cc dca.gis@gmail.com, grass-bugs@intevation.de, grass5@grass.itc.it
Subject Re: [GRASS5] [bug #4037] (grass) d.vect.thematic: fails to generate a legend for >20 custom_breaks
Message-Id <20060127114527.20c113ea.hamish_nospam@yahoo.com>
In-Reply-To <BFFE3EDC.1DB24%michael.barton@asu.edu>
References <1a486f560601252155y31ca2e76od37f992cc4b0da8f@mail.gmail.com> <BFFE3EDC.1DB24%michael.barton@asu.edu>
X-Mailer Sylpheed version 1.0.4 (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
> Thinking about this on the commute to work this morning, I came up
> with an idea for a longer-term way to deal with vector thematic
> mapping and legends. For vectors, I can't think of a situation where a
> legend is NOT used for some kind of thematic mapping, even if there is
> a legend item for each vector object. That is, it is somewhat
> different from raster legends for floating point maps. So here is my
> idea that builds on the unique multi-layer vector architecture for
> GRASS.

The data I work with is often a swarm of vector points. e.g. bathymetric
soundings or a trail of measurements (e.g. temperature) along a line of
gps track points. In these cases a pseudo-continuous legend (like
d.legend for floating point) is preferable. Currently I calculate RGB
values in Matlab during post-processing and place in a GRASSRGB column,
but this is unpractible for e.g. LIDAR data where there can be no table.
Automatic would be better.

d.vect.thematic doesn't have to support this, but a use case to
consider..

As was earlier suggested on the list, reusing the r.colors colr/ files
for vectors would be neat. Only thing to check is that the functions
that query the color don't need a raster to be open. i.e. the
vector/display libs can't depend on the raster lib.



Hamish


Wed, Jul 26 2006 18:17:50    User changed to tutey@o2.pl by msieczka  
Mon, Jan 29 2007 09:07:14    Status changed to resolved by dcalvelo  
Mon, Jan 29 2007 09:07:43    Mail sent by dcalvelo  
In CVS
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