[GRASS-dev] any special reason why choice of raster compression method is done via environmental variable ?

Markus Metz markus.metz.giswork at gmail.com
Mon Dec 9 13:50:46 PST 2019


 Hi Moritz,

On Wed, Dec 4, 2019 at 10:28 AM Moritz Lennert <mlennert at club.worldonline.be>
wrote:
>
> Hi Markus,
>
> In recent days, I've been confronted several times with the issue of
> people trying to share data among themselves, but using different
> versions of GRASS, and so raster data compressed in a more recent
> version of GRASS was not usable in an older version of GRASS.
>
> Now, I agree that generally the solution is to tell people to use the
> latest and greatest, but this is not always possible / it is not
> necessarily highest on the list of priorities of people to see how they
> can install the latest version of GRASS within their particular
environment.
>
> Obviously, those with the latest version of GRASS can simple recompress
> using ZLIB. However, compression method is defined as an environment
> variable. This is somewhat daunting to many MS Windows users out there.
> Is there any specific reason that lead to the choice of not using a
> parameter to allow the choice of compression method (possibly to
> override a default that is still defined by an environment variable) ?

Such a parameter would need to be added to every module creating raster
output.

The reason for an environment variable is historical: previously, CELL maps
were by default compressed with RLE, this could be changed with the env var
GRASS_INT_ZLIB. This mechanism of using an env var for raster compression
has been extended.

Other solutions than an env var would be to use g.gisenv/$GISRC to set the
default compression method per user or a mapset-specific compression method
(to be set with a modified r.compress?) stored in the mapset's VAR file.

Regarding MS Windows users + raster compression: I think it is reasonable
to assume at least GRASS 7.6 which has support all compression methods
available in GRASS.

Markus M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20191209/fec79b16/attachment.html>


More information about the grass-dev mailing list