Skip to content

Commit

Permalink
bump geodesy
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Nov 24, 2023
1 parent 46ee4e2 commit 2589b87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion transform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies]
geodesy = "0.11"
geodesy = "0.11.1"
crs-definitions = "0.3"
geo = "0.27"
thiserror = "1"
24 changes: 1 addition & 23 deletions transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,6 @@ pub struct Transformer {
target: geodesy::OpHandle,
}

mod noop {
pub const GAMUT: [geodesy::OpParameter; 0] = [];

pub fn new(
parameters: &geodesy::RawParameters,
_ctx: &dyn geodesy::Context,
) -> Result<geodesy::Op, geodesy::Error> {
geodesy::Op::plain(
parameters,
geodesy::InnerOp::default(),
Some(geodesy::InnerOp::default()),
&GAMUT,
_ctx,
)
}
}

impl Transformer {
pub fn setup(source_crs: u16, target_crs: u16) -> Result<Self, Error> {
let source =
Expand Down Expand Up @@ -89,10 +72,5 @@ pub fn lookup_epsg_code(epsg_code: u16) -> Result<(geodesy::Minimal, geodesy::Op
}

fn geodesy_ctx() -> geodesy::Minimal {
let mut ctx = geodesy::Minimal::new();
// https://github.com/Rennzie/geodesy-wasm/blob/82f9ef050372d53144969dba60807c7dac38c910/src/geodesy/operators/mod.rs#L7-L19
//
// https://github.com/busstoptaktik/geodesy/issues/79
ctx.register_op("longlat", geodesy::OpConstructor(noop::new));
ctx
geodesy::Minimal::new()
}

0 comments on commit 2589b87

Please sign in to comment.