Skip to content

fix: use --tvs-source-path for neighbourhood viewsheds#65

Open
tombh wants to merge 1 commit into
mainfrom
tombh/fix-use-tvs-source-path
Open

fix: use --tvs-source-path for neighbourhood viewsheds#65
tombh wants to merge 1 commit into
mainfrom
tombh/fix-use-tvs-source-path

Conversation

@tombh

@tombh tombh commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Previously it was just using the DEM itself as the source.

Previously it was just using the DEM itself as the source.
@tombh tombh requested a review from ryan-berger June 4, 2026 15:26
.only_save_biggest_viewsheds
.context("Must specify --only-save-biggest-viewsheds")?;
let dataset = gdal::Dataset::open(&config.input)?;
let tvs_source_path = config

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm a bit confused here.... Can you have both a --input and a --tvs_source_path?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes. --input is for the raw elevation data, --tvs-source-path is for providing a heatmap so that the neighbourhood culling algorithm can select the best viewsheds.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense

let dataset = gdal::Dataset::open(&config.input)?;
let tvs_source_path = config
.tvs_source_path
.clone()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does .clone() do some sort of path validation?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think the clone is just prevent a partial borrow of config.

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