[GRASS-user] Exporting labels of a raster

Rainer M Krug r.m.krug at gmail.com
Fri Jul 1 07:54:45 EDT 2011


On Fri, Jul 1, 2011 at 1:24 PM, Luisa Peña <luisapena1979 at gmail.com> wrote:

> It didn't work. I get all full of NaNs map.
> I used this:
>     input="LUlabel at Study"
>     grass.run_command("g.region", rast = input)
>     grass.mapcalc("$output= @$labels", labels=input, output="Giovanni2")
>
> What am I doing wrong on this?
>

NaN means Not a Number - were your labels non-numeric?
I *think* that raster can only have numeric cell values

Rainer



> Luisa
>
> 2011/7/1 Giovanni Manghi <giovanni.manghi at gmail.com>
>
>> Hi,
>>
>>
>> >
>> > I have a raster map to wich I have applied r.reclass to add labels to
>> > raster classes.  When I try to export this raster with the classes I
>> > loose the lablels I only stick with the values.
>> > In a script how can edit this raster in order to be exported with the
>> > labels?Thanks
>>
>>
>> r.mapcalc "new_map=@existing_map"
>>
>> then export "new_map" to tiff as usual.
>>
>> Cheers
>>
>> -- Giovanni --
>>
>>
>>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>


-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax (F):       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer at krugs.de

Skype:      RMkrug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110701/0bf3f16a/attachment.html


More information about the grass-user mailing list