Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Allow for parsing the output from GRASS #10

Open
wenzeslaus opened this issue Aug 23, 2022 · 0 comments
Open

Allow for parsing the output from GRASS #10

wenzeslaus opened this issue Aug 23, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@wenzeslaus
Copy link

Text messages from ace go to stdout which is where output from the GRASS modules goes as well. This prevents easy parsing of the output.

While locally, I can do:

> eval `r.univar -g elev_state_500m`
> echo $min
-6.684585564

With ace, r.univar output is mixed with ace output:

> ace location=nc_spm_08 grass_command="r.univar -g elev_state_500m"
https://actinia.mundialis.de//api/v3/locations/nc_spm_08/processing_async_export
...
n=546136
null_cells=464464
cells=1010600
min=-6.684585564
max=1952.0009637576
range=1958.6855493216
mean=214.740100188344
mean_of_abs=214.742279455688
stddev=307.296405943419
variance=94431.0811057426
coeff_var=143.101547253585
sum=117277299.356462

{'resources': [],
 'status': 'https://actinia.mundialis.de/api/v3/resources/demouser/resource_id-bb6b1ca9-08cf-4793-b955-7a54e8ab8d17'}

This can be examined, e.g., by redirecting the output to a file:

> ace location=nc_spm_08 grass_command="r.univar -g elev_state_500m" > /tmp/out.txt

This is somewhat similar to #4, but here, the idea is for the command to work in the same way as a command in GRASS shell would work. A similar situation is with grass --exec where parsing in this case would work as for r.univar in a GRASS shell:

> grass ~/grassdata/nc_spm_08/ --tmp-mapset --exec r.univar -g elev_state_500m > /tmp/out.txt
@anikaweinmann anikaweinmann added the enhancement New feature or request label Oct 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants