[GRASS-user] Raster renamed but d.rast does not find it [RESOLVED]

Moritz Lennert mlennert at club.worldonline.be
Tue Sep 13 01:11:33 PDT 2016


Le Fri, 9 Sep 2016 14:45:57 -0700 (PDT),
Rich Shepard <rshepard at appl-ecosys.com> a écrit :

> On Fri, 9 Sep 2016, Rich Shepard wrote:
> 
> >  Question: If a map is renamed why is the old name retained?  
> 
>    Furthermore, there's no file named 'hdr' in the mapset's
> directories.

[I should have read this before sending my previous mail]:

Just imagine you are only working on the command line (using a d.mon
wx0 for example). You run

d.rast OldMapName

It displays.

You then run

g.rename rast=OldMapName,NewMapName

If you now run

d.rast OldMapName

it will give you an error about it not finding the map.

You have to run 

d.rast NewMapName

The GUI works in the same way: when you add a raster layer, you actually
create a d.rast call. This call is defined by the properties.  And when
you refresh your display, this d.rast command is called as defined.

Running g.rename on a map does not automatically change your d.rast call
definition. It is your responsibility to do that.

Moritz


More information about the grass-user mailing list