[GRASS5] d.legend with vector file support

Jachym Cepicky jachym.cepicky at centrum.cz
Tue May 17 15:56:42 EDT 2005


sorry

if you run this with raster map, you get segfault, sorry for this, here comes
the patch which solves this, it should be applayed after the patch from my
first e-mail.

the module has not been much tested, so I'm expecting other problems..

Jachym

On Tue, May 17, 2005 at 09:41:36PM +0200, Jachym Cepicky wrote:
> Hallo developers,
> thanks Hamish and Glynn, things have moved fast forward and I would like to give you some
> patches and new files for d.legend, which should enable d.legend to make legend
> from database table of vector files (according to GRASSRGB column).
> 
> You can use "type" option, however points are not supported yet, but
> "boundary", "line", "area" and "face" are.
> 
> I have still some problems whith layouting the color boxes, I hope to get it
> somehow work..
> 
> After moving the code to separate file, I get warnings:
> 
>     ...
>     vector.c:213: warning: passing arg 1 of `R_RGB_color' with different width due to prototype
>     ...
> 
> and I don't know what to do with this
> 
> 
> In main.c are only minor changes, the most importand part of the code are two
> functions stored in vector.c
> 
> I hope, it will be usable, looking forward to your comments
> 
> Jachym
> -- 
> Jachym Cepicky
> e-mail: jachym.cepicky at centrum.cz
> URL: http://les-ejk.cz
> GPG: http://www.fle.czu.cz/~jachym/gnupg_public_key/



-- 
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://www.fle.czu.cz/~jachym/gnupg_public_key/
-------------- next part --------------
--- main.c-old	2005-05-17 21:52:45.648728184 +0200
+++ main.c	2005-05-17 21:52:57.234966808 +0200
@@ -264,7 +264,8 @@
             G_fatal_error(buff);
         }
 
-        strcpy(vlegend_column, column_opt->answer);
+        if (veclegend)
+            strcpy(vlegend_column, column_opt->answer);
 
         /* getting vector map colors */
         if (veclegend) {


More information about the grass-dev mailing list