Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
run: cargo build --verbose --all
- name: Run tests
run: cargo nextest run
- name: Install wasm-pack
uses: taiki-e/install-action@wasm-pack
- name: Build WASM
run: wasm-pack build --target web crates/viewshed-reconstructor

e2e:
name: End to end tests
Expand Down
81 changes: 68 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ resolver = "2"
members = [
"crates/total-viewsheds",
"crates/tvs-lib",
"crates/viewshed-reconstructor",
]

[workspace.dependencies]
color-eyre = "0.6.5"
geo = "0.31.0"
serde = "1.0.219"
serde_json = "1.0.143"
tracing = { version = "0.1.41" }
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }

# Canonical lints for whole crate
#
Expand Down
5 changes: 3 additions & 2 deletions crates/total-viewsheds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ memchr = "2.8.0"
serde_json.workspace = true
rusqlite = { version = "0.38.0", features = ["bundled"] }
rayon = "1.12.0"
tracing = { version = "0.1.41" }
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
tracing.workspace = true
tracing-subscriber.workspace = true
tvs-lib = { path = "../tvs-lib", version = "0.1.0" }
viewshed-reconstructor = { path = "../viewshed-reconstructor", version = "0.1.0" }

[dev-dependencies]
tempfile = "3.20.0"
Expand Down
15 changes: 3 additions & 12 deletions crates/total-viewsheds/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,9 @@ mod storage {
/// Various ways to output data.
mod output {
mod ascii;
mod bresenham;
pub(crate) mod png;
pub(crate) mod tiff;

/// Load, parse and reconstruct euclidean polygon viewsheds from their raw polar segments.
pub(crate) mod viewsheds {
mod growable_polygon;
mod joiner;
mod segment_polygon;
mod vertices;
pub(crate) mod viewshed;
}
pub(crate) mod viewshed;
}

fn main() -> Result<()> {
Expand All @@ -98,11 +89,11 @@ fn main() -> Result<()> {
geo::coord! {x: f64::from(coordinate.0), y: f64::from(coordinate.1)},
);

let (_, viewshed) = crate::output::viewsheds::viewshed::Viewshed::reconstruct(
let (_, viewshed) = crate::output::viewshed::Viewshed::reconstruct(
viewshed_config.db_path.clone(),
geo_coord,
)?;
crate::output::viewsheds::viewshed::Viewshed::save(
crate::output::viewshed::Viewshed::save(
viewshed,
&viewshed_config.output_dir,
geo_coord,
Expand Down
Loading
Loading