[GRASS-user] Best format for exporting raster data
Markus Metz
markus.metz.giswork at googlemail.com
Wed Sep 1 05:18:32 EDT 2010
Rainer M Krug wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi
>
> I am creating a huge amount of raster layers during my simulations, and
> I would like to archive then to enable further analysis. At the moment I
> am leaving them in the grass database and compress the whole mapset into
> a tar.gz file. But this is rather cumbersome, if I want to extract some
> selected layers and analyse them further (my analysis is done in R).
> Therefore I would like to export the created layers while the simulation
> is running and to delete them from the grass database.
> My question: what is the best format for this?
> It should :
> - - contain all the information contained in the raster layer in the grass
> mapset
> - - be readable by at least gdal
> - - be preferably compressed (but I can compress them after export)
>
> At the moment I am using for a similar purpose the esri asc grid, but I
> am somehow critical about the fact that it uses a text representation of
> my data with limited decimals, therefore probably loosing information
> compared with the grass file.
>
> Are Binary fiels a better option (in the manual it states "Exports", not
> "converts" as in the esri ascii grid) and can I read them from R or gdal?
>
Raster data (the actual data grids) are already compressed in GRASS,
nothing much to gain there to compress already compressed data. You
can try to set GRASS_INT_ZLIB [1] and check if this gives better
compression than the default RLE for CELL maps.
Generally, the recommended export format is GeoTIFF which supports
various internal compression methods. A high compression ratio is
achieved with LZW and DEFLATE.
Not all packages using gdal support all gdal features, DEFLATE in
particular is often not supported by packages using their own modified
gdal version (does not apply to packages using an external gdal
library, e.g. GRASS, R, QGIS).
Markus M
[1] http://grass.osgeo.org/grass64/manuals/html64_user/variables.html
More information about the grass-user
mailing list