[GRASS5] [bug #3587] (grass) v.to.rast: assign a proper color table to the output

Related to the v.to.rast color table problem there might
be below code in:
vector/v.to.rast/support.c

int
update_fcolors (char *raster_name)
{
    struct Colors colors;

    /* G_read_fp_range(raster_name, G_mapset(), &range); */
    /* G_get_fp_range_min_max(&range, &min, &max); */
    G_make_rainbow_colors(&colors, 0, 360);
    G_write_colors(raster_name, G_mapset(), &colors);

    return 0;
}

Should it be min max instead of 0 360?

Markus

-------------------------------------------- Managed by Request Tracker

Markus Neteler via RT wrote:

Related to the v.to.rast color table problem there might
be below code in:
vector/v.to.rast/support.c

int
update_fcolors (char *raster_name)
{
    struct Colors colors;

    /* G_read_fp_range(raster_name, G_mapset(), &range); */
    /* G_get_fp_range_min_max(&range, &min, &max); */
    G_make_rainbow_colors(&colors, 0, 360);
    G_write_colors(raster_name, G_mapset(), &colors);

    return 0;
}

Should it be min max instead of 0 360?

yes, I am guessing that this color table was there for v.to.rast2 for the line direction angle - min,max should cover it.

Helena

Markus

-------------------------------------------- Managed by Request Tracker

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

On Mon, Aug 29, 2005 at 10:40:44AM -0400, Helena Mitasova wrote:

Markus Neteler via RT wrote:
>Related to the v.to.rast color table problem there might
>be below code in:
>vector/v.to.rast/support.c
>
>
>
>int
>update_fcolors (char *raster_name)
>{
> struct Colors colors;
>
> /* G_read_fp_range(raster_name, G_mapset(), &range); */
> /* G_get_fp_range_min_max(&range, &min, &max); */
> G_make_rainbow_colors(&colors, 0, 360);
> G_write_colors(raster_name, G_mapset(), &colors);
>
> return 0;
>}
>
>
>Should it be min max instead of 0 360?

yes, I am guessing that this color table was there for v.to.rast2 for
the line direction angle - min,max should cover it.

I have update v.to.rast to use min/max instead of 0..360
for floating point maps for the rainbow color table.
Also updated:

- rainbow instead of random colors for integer maps (for consistency).
- description [1]

Markus

[1] If developers update a module, please also update the description.html...
    Hot candidates: the SQL related pages

On Tue, 2005-08-30 at 12:14 +0200, Markus Neteler wrote:

On Mon, Aug 29, 2005 at 10:40:44AM -0400, Helena Mitasova wrote:
> Markus Neteler via RT wrote:
> >Related to the v.to.rast color table problem there might
> >be below code in:
> >vector/v.to.rast/support.c
> >
> >
> >
> >int
> >update_fcolors (char *raster_name)
> >{
> > struct Colors colors;
> >
> > /* G_read_fp_range(raster_name, G_mapset(), &range); */
> > /* G_get_fp_range_min_max(&range, &min, &max); */
> > G_make_rainbow_colors(&colors, 0, 360);
> > G_write_colors(raster_name, G_mapset(), &colors);
> >
> > return 0;
> >}
> >
> >
> >Should it be min max instead of 0 360?
>
> yes, I am guessing that this color table was there for v.to.rast2 for
> the line direction angle - min,max should cover it.

I have update v.to.rast to use min/max instead of 0..360
for floating point maps for the rainbow color table.
Also updated:

- rainbow instead of random colors for integer maps (for consistency).
- description [1]

Markus

[1] If developers update a module, please also update the description.html...
    Hot candidates: the SQL related pages

Oops. I think that was my all doing when I added Helena's changes to
output flow direction. I'll update the description.html immediately.

--
Brad Douglas <rez@touchofmadness.com>