Skip to content
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

r.profile: add JSON support #3872

Merged
merged 2 commits into from
Jul 2, 2024
Merged

r.profile: add JSON support #3872

merged 2 commits into from
Jul 2, 2024

Conversation

kritibirda26
Copy link
Contributor

Use parson to add json output format support to the r.profile module.

The output format is as follows:

[
    {
        "easting": <float>,
        "northing": <float>,
        "distance": <float>,
        "elevation": <float>,
        "red": <int>,
        "green": <int>,
        "blue": <int>
    },
    {
        "easting": <float>,
        "northing": <float>,
        "distance": <float>,
        "elevation": <float>,
        "red": <int>,
        "green": <int>,
        "blue": <int>
    },
...
]

Note that the elevation field is the name of the input and red, green, blue fields are only included if the colors flag is specified.

@github-actions github-actions bot added raster Related to raster data processing Python Related code is in Python C Related code is in C HTML Related code is in HTML module docs tests Related to Test Suite labels Jun 17, 2024
raster/r.profile/r.profile.html Show resolved Hide resolved
raster/r.profile/read_rast.c Outdated Show resolved Hide resolved
raster/r.profile/read_rast.c Show resolved Hide resolved
@github-actions github-actions bot added windows Microsoft Windows specific GUI wxGUI related docker Docker related CI Continuous integration vector Related to vector data processing temporal Related to temporal data processing C++ Related code is in C++ database Related to database management libraries general display imagery notebook misc labels Jun 29, 2024
Use parson to add json output format support to the r.profile module.
Copy link
Contributor

@cwhite911 cwhite911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Member

@echoix echoix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proxying @cwhite911's approval

@echoix echoix removed windows Microsoft Windows specific GUI wxGUI related docker Docker related CI Continuous integration vector Related to vector data processing temporal Related to temporal data processing Python Related code is in Python C Related code is in C C++ Related code is in C++ HTML Related code is in HTML database Related to database management libraries module docs general display imagery tests Related to Test Suite notebook misc labels Jul 2, 2024
@github-actions github-actions bot added Python Related code is in Python C Related code is in C HTML Related code is in HTML module docs tests Related to Test Suite labels Jul 2, 2024
@echoix echoix added this to the 8.5.0 milestone Jul 2, 2024
@echoix echoix merged commit 7f4aabf into OSGeo:main Jul 2, 2024
26 checks passed
a0x8o pushed a commit to a0x8o/grass that referenced this pull request Jul 2, 2024
Use parson to add json output format support to the r.profile module.
a0x8o pushed a commit to a0x8o/grass that referenced this pull request Jul 23, 2024
Use parson to add json output format support to the r.profile module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Related code is in C docs HTML Related code is in HTML module Python Related code is in Python raster Related to raster data processing tests Related to Test Suite
Projects
Development

Successfully merging this pull request may close these issues.

3 participants