[GRASS-dev] NULL file compression: loop over uncompressed maps to save disk space

Markus Neteler neteler at osgeo.org
Wed Jan 11 03:37:53 PST 2017

On Wed, Jan 11, 2017 at 10:34 AM, Markus Metz
<markus.metz.giswork at gmail.com> wrote:
> On Tue, Jan 3, 2017 at 6:08 PM, Markus Neteler <neteler at osgeo.org> wrote:
>> Questions:
>> I believe that an additional -g flag for shell style printing would be
>> useful as well).
>> Maybe with a -g flag no need to use the stderr redirect?
>> Any better ideas here? (if yes, feel free to submit to SVN for testing)
> I have added your changes and a new shell style option to trunk in r70337.

Thanks for that!

> Note that this is not standard shell style because the module accepts
> several input maps, thus compression info is written to stdout as one line
> per input map. The format is
> input map name|data type|name of data compression method|NULL file
> compression
> e.g.
> eu_dem25|FCELL|ZLIB|NO
> or
> eu_dem25|FCELL|BZIP2|YES

Yes, that's quite useful like this. Maybe a small modification to make
it usable for the beloved eval() function?

r.compress -g eu_dem25
This would keep the -g implementations consistent across different commands.

>> ################
>> Since r.null -z doesn't do anything useful if GRASS_COMPRESS_NULLS is
>> not set I have tried (!) to add a G_message() to tell the user if that
>> variable is set or not.
>> r.null -z eu_dem25
>> The GRASS_COMPRESS_NULLS environment variable is currently set
>> 6%...
>> But it *always* tells that it is set, so my getenv() parsing is wrong.
>> Can anyone help please? Also attached...
> Try trunk r70338.


> This also fixes removal of a compressed NULL file: the
> file name is nullcmpr, not null2

That old "null2" name is also here:

./raster/r.support/main.c:    G_file_name_misc(path, "cell_misc",
"null2", raster->answer, G_mapset());


More information about the grass-dev mailing list