Skip to content

Commit

Permalink
WIP: First part of implementing walking-coverage in Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
ggiraldez committed Apr 29, 2024
1 parent 5247c11 commit de240d5
Show file tree
Hide file tree
Showing 9 changed files with 1,075 additions and 3 deletions.
436 changes: 436 additions & 0 deletions Cargo.lock

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[workspace.package]
version = "0.1.0"
edition = "2021"
publish = false

[workspace]
resolver = "2"
members = [
"rust/aggregate-population",
"rust/walking-coverage",
]

[workspace.dependencies]
gdal = { version = "^0.16.0", features = ["ndarray"] }
gdal-sys = "^0.9.1"
4 changes: 2 additions & 2 deletions rust/aggregate-population/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
gdal = { version = "^0.16.0", features = ["ndarray"] }
gdal-sys = "^0.9.1"
gdal.workspace = true
gdal-sys.workspace = true
2 changes: 1 addition & 1 deletion rust/aggregate-population/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn aggregate_band(dataset: Dataset, band_no: isize) -> errors::Result<(f64, f32)
};
let raw_data = data.as_slice();
// End low-level, unsafe section of code

for iy in 0..span_y {
for ix in 0..span_x {
let value = raw_data[ix + iy * block_x_size];
Expand Down
2 changes: 2 additions & 0 deletions rust/walking-coverage/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fixtures/
target/
Loading

0 comments on commit de240d5

Please sign in to comment.