[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 23:39:50 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 sbl):

 Replying to [comment:1 glynn]:
 >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).

 Provided, that I have no idea how much work it would be to implement this,
 it sounds like a very nice solution to me.


 >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).

 I see that this is a bit tricky, as it might be necessary to distinguish
 maps linked to GRASS (for maps produced by other people or software which
 have been linked into GRASS using r.external (which should not be meddled
 with)) and maps/files produced from within GRASS. Furthermore, users may
 choose map names differing from file names when they link them to GRASS
 (r.external). However, an optional flag for keeping maps and files in sync
 would be nice, if that is feasible.

 Two other things to consider in this context are (maybe):

 1) Let`s say a user sets the external output path to ~/output for GeoTiffs
 with extension ."tif". Then the user produces a map with the name "map_a".
 Later this "map_a" is renamed to "map_b". The file "~/output/map_a.tif"
 will then be linked to "map_b", right? What happens in such a case, if
 another map with the name "map_a" is produced. The map name does not exist
 anymore in GRASS, but the file "~/output/map_a.tif" does, on the file
 system. Is it checked that "~/output/map_a.tif" is not overwritten in such
 a case.

 2) Let`s assume one wants to use maps produced in GRASS with
 r.external.out in other software. During map production the user finds
 out, that a different name for the map would have been more suitable.
 After running g.rename the new, more appropriate name is used in GRASS
 while other software will still have to work with the old filename. The
 way to sync that manually would be to remove the map (link) (instead of
 renaming it), rename the underlying file (mv), and then link that file
 again into GRASS (r.external). What happens to map history in such cases?

 In general, I think having an option for keeping maps and files in sync
 automatically would make it much more easy to maintain a tidy and clean
 data storage with external files...

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2282#comment:2>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list