Skip to content

Only use distances of band #5

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

Merged
merged 4 commits into from
Aug 18, 2025
Merged

Only use distances of band #5

merged 4 commits into from
Aug 18, 2025

Conversation

tombh
Copy link
Owner

@tombh tombh commented Aug 17, 2025

Big space reduction. Like 5.5MB to 1.6KB for 1200x1200 DEMS! So ~3500x improvement.

Remember to rm -r ~/.local/state/total-viewsheds when updating to this PR.

TODO:

  • Support for ~1GB DEMs

tombh added 3 commits August 18, 2025 16:50
This allows for higher absolute invocations counts, which we're starting
to need for crunching Everest-scale DEMs.

The function that finds the dispatch sizes also tries to balance
dispatches for better workgroup saturation?
And some moving of code into dedicated functions etc.
Previously we were using the distances of every single point in the DEM.
But I realised that the distances are always the same for every band.
This has yet another massive space saving, probably √N.

The total surface area tests did change very slightly, I hope I didn't
overlook anything. But we can't validate any actual correctness until I
actually am able to reconstruct individual viewsheds.
@tombh tombh force-pushed the only-use-distances-of-band branch from 915d010 to 53ba380 Compare August 18, 2025 21:55
GeoTiff would be ideal, but Rust's current `geotiff` crate can't handle
the size of DEMs that we need (to calculate the longest line of sight
on the planet).
@tombh tombh force-pushed the only-use-distances-of-band branch from 53ba380 to cec4ec4 Compare August 18, 2025 21:58
@tombh tombh merged commit 62a71e4 into main Aug 18, 2025
2 checks passed
@tombh tombh deleted the only-use-distances-of-band branch August 18, 2025 23:56
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.

1 participant