[GRASS5] D.vect.graph problem

Michael Barton michael.barton at asu.edu
Tue Sep 21 12:31:02 EDT 2004


Moritz,

Indeed, there are some cases for which all columns used in the pie chart
would be zero. Do I need to filter these out? Perhaps the pie chart
algorithm should automatically filter these out if it is problematic??

Michael


On 9/21/04 2:58 AM, "Moritz Lennert" <mlennert at club.worldonline.be> wrote:

>> From display/d.vect.chart/pie.c:
>> 
>>     double a, end_ang, ang, tot_sum, sum, step, r;
>> 
>> while ( 1 ) {
>>   if ( a > end_ang ) a = end_ang;
>>   x = cx + r * cos ( a );
>>   y = cy + r * sin ( a );
>>   Vect_append_point ( Points, x, y, 0);
>> 
>>   if ( a == end_ang ) {
>>       ang = end_ang;
>>       break;
>>   } else {
>>       a += step;
>>   }
>> }
>> 
>> One possiblity is that the "a == end_ang" test never becomes true
>> (even after the "a = end_ang" assignment), so the loop runs forever.
>> 
> 
> The problem happens to me when for at least one spatial entity all the
> columns used for the pie chart contain zero. Michael can you confirm this
> ? Is this linked to the above loop ?
> 
> Moritz
> 

______________________________
Michael Barton, Professor & Curator
School of Human Diversity 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




More information about the grass-dev mailing list