[GRASS-dev] Parsing output of r.category which includes labels
nik at nikosalexandris.net
Tue Aug 21 04:29:03 PDT 2018
* Moritz Lennert <mlennert at club.worldonline.be> [2018-08-21 12:57:01 +0200]:
>On 21/08/18 12:47, Stefan Blumentrath wrote:
>>If you are interested in dictionary output you could do:
>>category_labels = grass.parse_command('r.category', map='youmap', delimiter='\t')
>Right, nice solution !
>For those not very familiar with the scripting library: the
>"delimiter" option here is an option to parse_command, not to
>r.category. It decides which delimiter parse_command should use for
>deciding what is a key and what is a value.
Fantastic. I read that 'delimiter' somewhere... :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 228 bytes
Desc: not available
More information about the grass-dev