[GRASS-user] Best format for exporting raster data

Glynn Clements glynn at gclements.plus.com
Thu Sep 2 15:21:52 EDT 2010


Rainer M Krug wrote:

> > But GRASS doesn't generally read data from files per se, but from
> > either the GRASS "database" or from GDAL (and the former might
> > eventually go away if we can get "native" GRASS support into GDAL).
> 
> I don't understand that statement - I am the database is ultimately a
> file, so grass is requesting the data from the database which then reads
> it from the mapset which consists of files.

Ultimately, it's files, but only at the lowest level of the core
libraries. Modules get their data from the "GRASS database", but the
nature of that database is an implementation detail.

> And gdal is used when data is read which is not in the mapset -
> right?

GDAL is used if you create a "linked" map using r.external or
r.external.out. 

> > Similarly, while there exist filesystems which can mount archives, tar
> > files (and especially compressed tar files) are a poor choice, as they
> > are designed for sequential access. ZIP/RAR are more suited to such
> > tasks.
> 
> but they can actually be mounted as was pointed out by Markus Neteler
> (http://www.linux.com/archive/feature/132196).

They can, but the filesystem will have to decompress a substantial
part of the archive just to access one file. If you use zip/rar, it
only has to decompress files which are accessed.

> > Ultimately, I don't think that this situation is common enough to be
> > worth doing anything about. If you want to access archived data, you
> > just unpack the archives first (or use an archive format which can be
> > mounted).
> 
> I'll folow the following approach: I'll leave the data uncompressed,
> until the analysis are completed (I have a new 2TB hdd now) and will
> compress them into tar.gz files as soon as the project is finished. If I
> need them again, I will use archivemount to access the data.

If you're planning on using archivemount, use zip/rar rather than
.tar.gz (and don't use "solid" rar archives, which have the same
problems with random access as tar files).

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list