<div dir="ltr"><div><div><br><br>On Wed, Jan 11, 2017 at 12:37 PM, Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>> wrote:<br>><br>> On Wed, Jan 11, 2017 at 10:34 AM, Markus Metz<br>> <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>> wrote:<br>> > On Tue, Jan 3, 2017 at 6:08 PM, Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>> wrote:<br>> ...<br>> >> Questions:<br>> >> I believe that an additional -g flag for shell style printing would be<br>> >> useful as well).<br>> >> Maybe with a -g flag no need to use the stderr redirect?<br>> >> Any better ideas here? (if yes, feel free to submit to SVN for testing)<br>> ><br>> > I have added your changes and a new shell style option to trunk in r70337.<br>><br>> Thanks for that!<br>><br>> > Note that this is not standard shell style because the module accepts<br>> > several input maps, thus compression info is written to stdout as one line<br>> > per input map. The format is<br>> > input map name|data type|name of data compression method|NULL file<br>> > compression<br>> > e.g.<br>> > eu_dem25|FCELL|ZLIB|NO<br>> > or<br>> > eu_dem25|FCELL|BZIP2|YES<br>><br>> Yes, that's quite useful like this. Maybe a small modification to make<br>> it usable for the beloved eval() function?<br>><br>> r.compress -g eu_dem25<br>> eu_dem25=FCELL|ZLIB|YES<br>> ?<br><br></div>In this case, eu_dem25 would be both the name of a raster map and the name of a variable, I find this confusing. And you still need to split the result. I guess parsing<br>eu_dem25|FCELL|ZLIB|YES<br></div>would be slightly easier in python than<br>eu_dem25=FCELL|ZLIB|YES<br><div><div><br>> This would keep the -g implementations consistent across different commands.<br><br></div><div>Full easy support for eval() is not possible if the same parameters are printed several times. See e.g. r.univar -gt with a zonal map, r.quantile, r.stats.quantile or v.db.connect -g with several connections defined. Therefore I would use one line with name=value where possible, otherwise one line per input with separated fields. I would not mix the two, IMHO it will cause confusion. <br></div><div><br>><br>> That old "null2" name is also here:<br>><br>> ./raster/r.support/main.c:    G_file_name_misc(path, "cell_misc",<br>> "null2", raster->answer, G_mapset());<br><br></div><div>Fixed in r70340,1 (trunk, relbr72).<br></div><div><br></div><div>Markus M<br></div><div><br></div></div></div>