Skip to content

Comments

r.horizon: add distance into output#3565

Merged
petrasovaa merged 3 commits intoOSGeo:mainfrom
petrasovaa:r.horizon-add-distance
Apr 8, 2024
Merged

r.horizon: add distance into output#3565
petrasovaa merged 3 commits intoOSGeo:mainfrom
petrasovaa:r.horizon-add-distance

Conversation

@petrasovaa
Copy link
Contributor

Distance to the horizon is computed within the algorithm, this only exposes the values with -l flag:

r.horizon --overwrite elevation=circ step=60 coordinates=637505,221755  -l
azimuth,horizon_height,horizon_distance
0.000000,0.197017,5010.039920
60.000000,0.196689,5017.220346
120.000000,0.196969,5014.957627
180.000000,0.197017,5010.039920
240.000000,0.196689,5017.220346
300.000000,0.196969,5014.957627

or

[
    {
        "x": 637505.000000,
        "y": 221755.000000,
        "azimuth": [
            0.000000,
            60.000000,
            120.000000,
            180.000000,
            240.000000,
            300.000000
        ],
        "horizon_height": [
            0.197017,
            0.196689,
            0.196969,
            0.197017,
            0.196689,
            0.196969
        ],
        "horizon_distance": [
            5010.039920,
            5017.220346,
            5014.957627,
            5010.039920,
            5017.220346,
            5014.957627
        ]
    }
]

@petrasovaa petrasovaa self-assigned this Apr 5, 2024
@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 Apr 5, 2024
Copy link
Contributor

@nilason nilason left a comment

Choose a reason for hiding this comment

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

The code looks good to me!

@petrasovaa petrasovaa merged commit 2c93249 into OSGeo:main Apr 8, 2024
@petrasovaa petrasovaa deleted the r.horizon-add-distance branch April 8, 2024 13:30
@neteler neteler added this to the 8.4.0 milestone Apr 21, 2024
@echoix echoix mentioned this pull request Apr 6, 2025
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

None yet

Development

Successfully merging this pull request may close these issues.

3 participants