SV: [GRASS-user] Raster legend

Martin Album Ytre-Eide Martin.Album.Ytre-Eide at nrpa.no
Thu Oct 8 08:13:53 EDT 2009


Thanks, but It did not seem to work, or I have not tried what you suggested.

The actual values are contained in the logarithmic, and that's fine. It is no problem converting the raster to non logarithmic with r.mapcalc, but it does not help me much. I cant use legend values from the non-logarithmic with the logarithmic raster since the scaling will not be right.

I have just used standard rules, but done some experiments with custom made without any luck.

I edited the rules in colr/directory as you described. It certainly did something, but not the intended. And I have yet not managed to get de-logged values in the legend. Have tried a lot of things, but I don't really understand the logic in the colr-files.

Any more/other ideas?


Regards,

Martin



-----Opprinnelig melding-----
Fra: Hamish [mailto:hamish_b at yahoo.com]
Sendt: 29. september 2009 17:20
Til: grass-user at lists.osgeo.org; Martin Album Ytre-Eide
Emne: Re: [GRASS-user] Raster legend

Martin Album Ytre-Eide wrote:
> I am displaying a raster where the values are logarithmic and that is
> fine. The d.legend gives me a nice legend, but I would like to convert
> the values in the legend to non logarithmic values (keeping the raster
> as it is). I can't find a way to do this in d.legend or r.colors.
>
> How is this done?

Are the actual values contained in the logarithmic? eg convert back to normal with r.mapcalc pow(e, MAP) or pow(10, MAP)?

are the rules custom made?
does 'd.legend use=' help?

note the legend used does not have to match the raster it shows on, you could do a trick where you make a list of the values you want on the legend, calculate that their logs are, use r.what.color to find the matching color, then use those colors with the de-logged values.

probably easier actually to copy the internal rules file in the MAPSET's colr/ directory, convert the first column and range to de- logged version, perhaps run r.mapcalc to make a delogged version of the map (or any, just to get the range), copy in the adjusted colr/ file into the colr/ dir, then use that map for the legend.



does that make some sense?

Hamish










-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20091008/5737186c/attachment.html


More information about the grass-user mailing list