[GRASSLIST:1931] Re: Export Raster

Daniel Victoria daniel_victoria at yahoo.com
Tue Dec 2 06:10:10 EST 2003


Hi all,

Thanks Glynn for the help.

But imagine this, you have 300 rasters and want to
erase half, but keep a backup. Wouldn't it be
easier/better to have a way to backup just those
rasters and not the entire dataset? Then, if later on,
I want to restore just 10 of those 150 backup rasters,
It would be very easy o do. Maybe some sort of export
program designed to export from Grass to a interchange
file and back to Grass, like the export program in
ARC...

Of course, since it's just a matter of getting all the
files and directories with the same name as the
raster, a simple shell script will do the trick...
I'll try to work on that and if successful, post it to
the list, but keep in mind that I'm a newbie at
programing... If anyone beats me to the task, feel
free to contribute :)

Daniel

--- Glynn Clements <glynn.clements at virgin.net> wrote:
> 
> Daniel Victoria wrote:
> 
> > I need to remove some grass rasters from my HD
> since
> > it's almost filled up, but I don't want to loose
> the
> > files. What would be the best way to do this? Is
> there
> > such a command like export, so I can do a safe
> backup
> > of the files? Should I use r.out.ascii, r.out.bin?
> Or
> > just copy the entire directory?
> 
> Backing-up an entire mapset is simple enough; just
> use tar/zip/etc on
> the mapset directory. Similarly for entire
> locations.
> 
> Backing-up individual maps is a bit more involved;
> however, all files
> pertaining to a given map have the same name as the
> map, except for
> those in the cell_misc directory, which reside in a
> subdirectory with
> the same name as the map. In both cases, the
> file/directory in
> question will exist in a subdirectory of the mapset
> directory. So you
> could use e.g.:
> 
> 	cd <database>/<location>/<mapset>
> 	tar cf <mapname>.tar */<mapname>
> 
> Using r.out.* will discard the category labels,
> colour table, history
> etc, so it isn't a particularly good mechanism for
> creating backups.
> 
> -- 
> Glynn Clements <glynn.clements at virgin.net>
> 

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/




More information about the grass-user mailing list