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

Add GDALViewshedGenerate binding #142

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

pericles-tpt
Copy link
Contributor

  • implement GDALViewshedGenerate binding
  • implement Viewshed go function (calls binding)
  • add TestViewshedSimpleHeight to test the binding

@pericles-tpt
Copy link
Contributor Author

Question: Invalid test results across GDAL versions

I found in my testing that different versions of GDAL pass different sections of the test:

  1. 3.1.0 < version < 3.4.2 - doesn't pass any tests
  2. 3.4.2 <= version < 3.10.1 - passes all tests EXCEPT when output mode is DEM
  3. 3.10.1+ - passes all tests

My solution for this is to return an error for any case where tests produce an invalid result, the current behaviour for the above is:

  1. Returns an error at the start of Viewshed()
  2. Returns an error IF the output mode is DEM
  3. Runs Viewshed() as normal

Do you prefer the approach I've implemented, which prevents the user from running Viewshed() when it could produce invalid data? Or, should I add a warning in the Viewshed() documentation comment and remove the errors for cases (1) and (2), this would allow the user to run Viewshed() for GDAL version 3.1.0+ at their own risk?

@coveralls
Copy link
Collaborator

coveralls commented Jan 28, 2025

Coverage Status

coverage: 98.403% (-0.1%) from 98.548%
when pulling f67b649 on Arlula:viewshed
into 3ca5b20 on airbusgeo:main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants