Skip to content

Commit

Permalink
r.horizon: get rid of global variables and other refactoring (#3346)
Browse files Browse the repository at this point in the history
Refactored r.horizon to make it possible to extend it in the future (e.g. multiple coordinates, parallelization, etc.), Refactoring includes

* removing most global variables and reorganizing them into structures depending on when the variables change and when they don't, e.g. member variables in new struct OriginAngle are constant for each origin point and angle computed. 
 * reducing the scope of some local variables
 * renaming/reorganizing some functions
 * reducing the code duplication between the point and raster mode
 * removing unused functions
 * addressing cppcheck complaints
 * adding a test comparing values of raster mode result with point mode results for couple points

I tried not do any changes that could impact results, e.g. there is still some discrepancy in how maxlength is computed for the  modes.
  • Loading branch information
petrasovaa committed Mar 22, 2024
1 parent 5399d9c commit 8c56397
Show file tree
Hide file tree
Showing 4 changed files with 542 additions and 678 deletions.
11 changes: 0 additions & 11 deletions raster/r.horizon/TODO

This file was deleted.

23 changes: 0 additions & 23 deletions raster/r.horizon/local_proto.h

This file was deleted.

0 comments on commit 8c56397

Please sign in to comment.