Thu, Nov 8 2001
23:25:53
|
|
Request created by guest
|
|
Subject: r.poly doesn't write label points correctly
Platform: Linux/Intel
grass downloaded at: CVS Server, Germany
grass sources source: yes, I am using the latest GRASS from CVS
Hi,
obviously r.poly doesn't calculate the label point positions
correctly (stored in dig_att) which leads to label problems.
It even fails with a simple test pattern:
Generate test pattern:
r.mapcalc testpat="if( (10*sin(2*row()) + 10*sin(2*col())) > 0.,null(),1)"
d.rast testpat
r.poly in=testpat out=testpat
v.support testpat
-> warning PNT_IN_AREA appears which shouldn't
When converting the dig_att/testpat to a sites list, the
label positions are quite strange.
I would expect the centers of the pattern.
d.erase
v.to.rast in=testpat out=testpat2
d.rast testpat2
-> one pattern is missing
It would be nice to have that fixed...
Markus
|
|
Sat, Nov 10 2001
15:56:00
|
|
Mail sent by glynn.clements@virgin.net
|
|
Return-Path |
<glynn.clements@virgin.net>
|
Delivered-To |
grass-bugs@mailman.intevation.de
|
From |
Glynn Clements <glynn.clements@virgin.net>
|
MIME-Version |
1.0
|
Content-Type |
text/plain; charset=us-ascii
|
Content-Transfer-Encoding |
7bit
|
Message-ID |
<15341.16254.359313.36485@cerise.nosuchdomain.co.uk>
|
Date |
Sat, 10 Nov 2001 14:53:50 +0000
|
To |
Request Tracker <grass-bugs@intevation.de>
|
Cc |
grass5@grass.itc.it
|
Subject |
Re: [GRASS5] [bug #825] (grass) r.poly doesn't write label points correctly
|
In-Reply-To |
<20011108222553.B988313A06@mailman.intevation.de>
|
References |
<20011108222553.B988313A06@mailman.intevation.de>
|
X-Mailer |
VM 6.94 under 21.4 (patch 4) "Artificial Intelligence (candidate #1)" XEmacs Lucid |
Request Tracker wrote:
> When converting the dig_att/testpat to a sites list, the
> label positions are quite strange.
> I would expect the centers of the pattern.
It uses the horizontal midpoint of the widest part of the polygon:
write_att(lab_digit, (char) dig_new_to_old_type(type),
cell_head.west + (p->col + (p->width / 2.0)) * cell_head.ew_res,
cell_head.north - (p->row + 0.5) * cell_head.ns_res,
cat);
At first glance, the obvious change would seem to be to change:
cell_head.north - (p->row + 0.5) * cell_head.ns_res,
to:
cell_head.north - (p->row + (p->height / 2.0)) * cell_head.ns_res,
However, "struct area_table" doesn't have a height field. That would
need to be added (to extr_areas.h), and bounds.c would need to be
updated to record the height as well as the width.
"cvs log" suggests that all of the recent non-trivial changes have
been done by Andrea Aime, so he would be the obvious "volunteer" ;)
--
Glynn Clements <glynn.clements@virgin.net>
|
|
Fri, Nov 16 2001
17:13:56
|
|
Priority changed to 70 by mneteler
|
|
Wed, Nov 21 2001
00:16:26
|
|
Priority changed to 75 by bernhard
|
|
Wed, Nov 21 2001
17:21:53
|
|
Mail sent by guest
|
|
Glynn,
do you see a chance to look at it? It seems that Andrea doesn't
manage...
Thanks!
Markus
|
|
Thu, Nov 22 2001
14:48:27
|
|
Mail sent by mneteler
|
|
Andrea Aime <aaime@comune.modena.it>
has fixed r.poly.
Closing this bug,
Markus
|
|
Thu, Nov 22 2001
14:48:31
|
|
Status changed to resolved by mneteler
|
|