[GRASS-dev] [GRASS GIS] #2282: r.external.out: keep GRASS maps and external files in sync
GRASS GIS
trac at osgeo.org
Mon May 5 06:42:26 PDT 2014
#2282: r.external.out: keep GRASS maps and external files in sync
-------------------------+--------------------------------------------------
Reporter: sbl | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.1.0
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by glynn):
Replying to [ticket:2282 sbl]:
> At the moment, GRASS maps and external files produced using
r.external.out are not fully kept in sync.
>
> This applies both when maps are renamed or removed. Names of external
files are not changed by g.rename and files are not deleted by g.remove or
g.mremove.
This behaviour is intentional; well, maybe "not entirely unintentional" is
more accurate.
If that's to change, it would need to be e.g. an option set by
r.external.out (for the default) and r.external (to allow it to be changed
for individual maps).
Certainly, it needs to be possible to delete the "link" which allows GRASS
to treat the file as a raster map without deleting the file itself. And
given that the existing g.remove behaviour is to remove the link but leave
the actual data, I'm not sure that should change (i.e. removing both the
link and the file needs a new flag, so no-one loses data unexpectedly).
Essentially, GDAL-linked maps are somewhat like a symlink to a file. Using
"rm" on a symlink deletes the symlink, not the file it refers to.
Similarly for "mv".
The GRASS tools (g.remove, g.rename, g.copy etc) need to be able to
manipulate the links. They don't necessarily have to be able to manipulate
the files; the OS' own file-management tools can handle that. Although, in
the case of renaming and copying, we should provide a convenient way to
update/copy the links; running r.external requires providing all of the
parameters again.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2282#comment:1>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list