[GRASS5] [bug #1231] (grass) g.copy bug: cell_misc ignored
Glynn Clements
glynn.clements at virgin.net
Wed Aug 14 08:00:31 EDT 2002
Request Tracker wrote:
> this bug's URL: http://intevation.de/rt/webrt?serial_num=1231
> -------------------------------------------------------------------------
>
> Hi,
>
> it seems that g.copy doesn't completely cop a map.
> At least the range file in cell_misc/ is ignored:
>
> E.g. current mapset 'modis', I am copying from 'PERMANENT' into
> 'modis':
>
> GRASS:~ > l ~/grassdata/pat/PERMANENT/cell_misc/geologia/
> total 4
> -r--r--r-- 1 merler ssi 10 Jul 20 1998 range
>
> GRASS:~ > g.copy geologia,test
> COPY [geologia at PERMANENT] to [test]
> raster
> header
> category
> color
> history
> misc
> fcell MISSING
> g3dcell MISSING
>
> GRASS:~ >l ~/grassdata/pat/PERMANENT/cell_misc/test
> ls: /ssi0/ssi/neteler/grassdata/pat/PERMANENT/cell_misc/test: No such file or
> directory
Er, shouldn't this be "modis" instead of "PERMANENT"?
AFAICT, g.copy *does* copy the cell_misc/<map> directory (assuming
that it's in etc/element_list).
> I feel that this should be fixed for 5.0.0 since the cell_misc
> may also contain histogram, reclassed_to and null.
Note that g.copy explicitly removes the reclassed_to file. This is
correct; however:
1. The code is part of cmd/copy.c, whereas the code to remove the
colr2 file is in lib/do_copy.c.
2. It uses sprintf/system ("rm -f ..."), rather than G_remove().
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list