-
-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] Add JSON output to r.describe #4903
Comments
Hey @echoix, I was trying to write tests for the above change, and I am using this raster map: map = if(row() == 5 && col() == 5, null(), if(row() % 2 == 0, col() * 0.5, -col() * 0.5)) When I run the following command: r.describe -1 map I get the following output: *
-5.000000--4.960784
-4.529412--4.490196
-4.019608--3.980392
-3.509804--3.470588
-3.039216--3.000000
-2.529412--2.490196
-2.019608--1.980392
-1.549020--1.509804
-1.039216--1.000000
-0.529412--0.490196
0.450980-0.490196
0.960784-1.000000
1.470588-1.509804
1.941176-1.980392
2.450980-2.490196
2.960784-3.000000
3.431373-3.470588
3.941176-3.980392
4.450980-4.490196
4.960784-5.000000 Is this output format correct(for negative values)? Also, when should we use the "-" symbol and "thru" in the |
Can another "expert" or someone knowing r.describe jump in? I don't know what to answer here |
The The output of
Of course, with increasing JSON support we get modern options here. |
Add JSON output for easy parsing of r.describe output.
Describe the solution you'd like
Add an option for format, such as
format=plain
for the current output format andformat=json
for the JSON output.A possible JSON layout could be:
Describe alternatives you've considered
Alternatively(helpful for numerical operations or parsing), the JSON layout could look like this:
The text was updated successfully, but these errors were encountered: