[GRASS5] [PATCH] introduce where clause in d.vect.thematic (and v.univar.sh)

Hi,

Attached two patches for introducing a 'where' clause in d.vect.thematic (and
v.univar.sh). This allows to display (and classify) only part of a vector map.

Any objections to me committing this ?

Moritz

(attachments)

d.vect.thematic.diff (2.76 KB)
v.univar.sh.diff (1.11 KB)

I think that this is a very good idea.

...But (sigh) I'll need to modify the thematic panel I just finished for the
GIS Manager if when goes in.

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: Moritz Lennert <mlennert@club.worldonline.be>
Reply-To: <mlennert@club.worldonline.be>
Date: Tue, 06 Sep 2005 22:30:41 +0200 (CEST)
To: Grass Developers List <grass5@grass.itc.it>
Cc: <daniel.calvelo@minag.gob.pe>, <michael.barton@asu.edu>
Subject: [PATCH] introduce where clause in d.vect.thematic (and v.univar.sh)

Hi,

Attached two patches for introducing a 'where' clause in d.vect.thematic (and
v.univar.sh). This allows to display (and classify) only part of a vector map.

Any objections to me committing this ?

Moritz

By all means, do it. Also, you might want to take a look at
http://grass.itc.it/pipermail/grass5/2005-June/018589.html and I might try to
integrate that too once Moritz makes his changes.

Daniel.

-- Daniel Calvelo Aros

---------- Original Message -----------
From: Michael Barton <michael.barton@asu.edu>
To: mlennert@club.worldonline.be, Grass Developers List <grass5@grass.itc.it>
Cc: daniel.calvelo@minag.gob.pe
Sent: Tue, 06 Sep 2005 15:26:04 -0700
Subject: [GRASS5] Re: [PATCH] introduce where clause in d.vect.thematic (and
v.univar.sh)

I think that this is a very good idea.

...But (sigh) I'll need to modify the thematic panel I just finished
for the GIS Manager if when goes in.

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: Moritz Lennert <mlennert@club.worldonline.be>
> Reply-To: <mlennert@club.worldonline.be>
> Date: Tue, 06 Sep 2005 22:30:41 +0200 (CEST)
> To: Grass Developers List <grass5@grass.itc.it>
> Cc: <daniel.calvelo@minag.gob.pe>, <michael.barton@asu.edu>
> Subject: [PATCH] introduce where clause in d.vect.thematic (and v.univar.sh)
>
> Hi,
>
> Attached two patches for introducing a 'where' clause in d.vect.thematic (and
> v.univar.sh). This allows to display (and classify) only part of a vector map.
>
> Any objections to me committing this ?
>
> Moritz

_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

------- End of Original Message -------

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel Calvelo Aros wrote:

By all means, do it. Also, you might want to take a look at
http://grass.itc.it/pipermail/grass5/2005-June/018589.html and I might try to
integrate that too once Moritz makes his changes.

Ok, I've committed the changes to introduce a where option. As soon
as (if) Hamish manages to find some time to allow rgb colors for
rectangles in ps.map, I will also activate the dormant code
concerning a ps legend.

Moritz

Daniel.

-- Daniel Calvelo Aros

---------- Original Message -----------
From: Michael Barton <michael.barton@asu.edu>
To: mlennert@club.worldonline.be, Grass Developers List <grass5@grass.itc.it>
Cc: daniel.calvelo@minag.gob.pe
Sent: Tue, 06 Sep 2005 15:26:04 -0700
Subject: [GRASS5] Re: [PATCH] introduce where clause in d.vect.thematic (and
v.univar.sh)

I think that this is a very good idea.

...But (sigh) I'll need to modify the thematic panel I just finished
for the GIS Manager if when goes in.

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: Moritz Lennert <mlennert@club.worldonline.be>
Reply-To: <mlennert@club.worldonline.be>
Date: Tue, 06 Sep 2005 22:30:41 +0200 (CEST)
To: Grass Developers List <grass5@grass.itc.it>
Cc: <daniel.calvelo@minag.gob.pe>, <michael.barton@asu.edu>
Subject: [PATCH] introduce where clause in d.vect.thematic (and v.univar.sh)

Hi,

Attached two patches for introducing a 'where' clause in d.vect.thematic (and
v.univar.sh). This allows to display (and classify) only part of a vector map.

Any objections to me committing this ?

Moritz

_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

------- End of Original Message -------

_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDHyTBrIrMbm76jD8RAp03AJ4uYQz8y+VCMozXiXN7jv89RX6esQCePXJB
Q+0onSZfxkMxtFaPu5WI+FA=
=Ts9i
-----END PGP SIGNATURE-----

Ok, I've committed the changes to introduce a where option. As soon
as (if) Hamish manages to find some time to allow rgb colors for
rectangles in ps.map, I will also activate the dormant code
concerning a ps legend.

I had been thinking about that yesterday WRT adding RGB color selection
for symbols via the ps.map point and vpoints instructions.

There was the question about changing the internal paint command file. I
think this is only used in ps.map so it won't be a problem, but if
anyone knows otherwise please speak up. Second warning, etc. etc.

The other thing I thought about was how best to add in GRASSRGB column
support for ps.map vector features. Conceivably someone might want to
use that column for both fill color and the line color. Also for
the busier commands adding more options isn't something I want to do.

Possible solution: extend the color name parsing code to accept an
attribute column name which would hold the RRR:GGG:BBB triplets. That it
is a column name would have to be denoted somehow, perhaps by putting
the name in <BRACKETS> and caps.

e.g.
color red
color 255:0:0
color <GRASSRGB>

would all work. Also this means you could do

color <FG_COLOR>
fcolor <FILL_COLOR>

or any other legal column name.

Devil is in the details of course, I don't know how easy it would be to
implement. But if it works and is liked, it might be a nice thing to
have in the display modules too. Consider also that beyond adding RGB
support to plotting commands and symbols in ps.map, and maybe GRASSRGB
column support to vareas, I can't spend very much time on this & someone
else would have to do the work.

Hamish

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hamish wrote:

Ok, I've committed the changes to introduce a where option. As soon
as (if) Hamish manages to find some time to allow rgb colors for
rectangles in ps.map, I will also activate the dormant code
concerning a ps legend.

Sorry, when I wrote rectangles, I meant symbols.

I had been thinking about that yesterday WRT adding RGB color selection
for symbols via the ps.map point and vpoints instructions.

There was the question about changing the internal paint command file. I
think this is only used in ps.map so it won't be a problem, but if
anyone knows otherwise please speak up. Second warning, etc. etc.

The other thing I thought about was how best to add in GRASSRGB column
support for ps.map vector features. Conceivably someone might want to
use that column for both fill color and the line color. Also for
the busier commands adding more options isn't something I want to do.

I agree.

Possible solution: extend the color name parsing code to accept an
attribute column name which would hold the RRR:GGG:BBB triplets. That it
is a column name would have to be denoted somehow, perhaps by putting
the name in <BRACKETS> and caps.

e.g.
color red
color 255:0:0
color <GRASSRGB>

would all work. Also this means you could do

color <FG_COLOR>
fcolor <FILL_COLOR>

or any other legal column name.

This would be cool. But I would put the priority on implementing RGB
support, if you're time is limited.

Devil is in the details of course, I don't know how easy it would be to
implement. But if it works and is liked, it might be a nice thing to
have in the display modules too.

Yes.

Consider also that beyond adding RGB
support to plotting commands and symbols in ps.map, and maybe GRASSRGB
column support to vareas, I can't spend very much time on this & someone
else would have to do the work.

These additions would already be a great advancement. If the code is
well documented, than maybe others will be able to extend RGB
support to other ps.map elements.

Moritz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDIUcVrIrMbm76jD8RAg3GAJ9zLW9uigYPvPiq9MDDBcd2okOuYwCfY6nf
VM2tTriimYND75EVRFGXKrU=
=hvAm
-----END PGP SIGNATURE-----

> By all means, do it. Also, you might want to take a look at
> http://grass.itc.it/pipermail/grass5/2005-June/018589.html and I
> might try to integrate that too once Moritz makes his changes.

Ok, I've committed the changes to introduce a where option. As soon
as (if) Hamish manages to find some time to allow rgb colors for
rectangles in ps.map, I will also activate the dormant code
concerning a ps legend.

I have just updated things so that the ps.map 'point' command now
accepts standard named colors, RGB triplets, and "none" as valid
input for both border and fill color.

The 'vpoints' command already had this functionality.

Also 'rectangle', 'line', and 'region' have been updated for RGB.

Note 'region' was broken, since at least the first CVS entry in 1999.
Now fixed in all branches.

have fun,

Hamish