From 7a40655b4739cf3ec307121893cde2e5720260d4 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 9 May 2024 13:21:28 +1200 Subject: [PATCH] :pushpin: Pin to georust/geo at rev 481196b Getter methods on AffineTransform implemented in https://github.com/georust/geo/pull/1159 has been merged into the main branch of georust/geo, so no longer need to point to my personal fork. Also fixed a mismatched type when accessing the x_res and y_res attributes. --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/io/geotiff.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a93116e..846734a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -369,7 +369,7 @@ dependencies = [ [[package]] name = "geo" version = "0.28.0" -source = "git+https://github.com/weiji14/geo.git?branch=affinetransform-index#0bd04a57d66fc1ff7d19524b16a03d9af8fe29a9" +source = "git+https://github.com/georust/geo.git?rev=481196b4e50a488442b3919e02496ad909fc5412#481196b4e50a488442b3919e02496ad909fc5412" dependencies = [ "earcutr", "float_next_after", diff --git a/Cargo.toml b/Cargo.toml index 1d33475..2e9a722 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] [dependencies] bytes = "1.5.0" -geo = { git = "https://github.com/weiji14/geo.git", branch = "affinetransform-index", version = "0.28.0" } +geo = { git = "https://github.com/georust/geo.git", version = "0.28.0", rev = "481196b4e50a488442b3919e02496ad909fc5412" } ndarray = "0.15.6" numpy = "0.21.0" object_store = { version = "0.9.0", features = ["http"] } diff --git a/src/io/geotiff.rs b/src/io/geotiff.rs index 4ca0115..6a68854 100644 --- a/src/io/geotiff.rs +++ b/src/io/geotiff.rs @@ -115,8 +115,8 @@ impl CogReader { let transform = self.transform()?; // affine transformation matrix // Get spatial resolution in x and y dimensions - let x_res: &f64 = transform.a(); - let y_res: &f64 = transform.e(); + let x_res: &f64 = &transform.a(); + let y_res: &f64 = &transform.e(); // Get xy coordinate of the center of the top left pixel let x_origin: &f64 = &(transform.xoff() + x_res / 2.0);