Skip to content

Commit

Permalink
remove overlapping operators (#37)
Browse files Browse the repository at this point in the history
* remove unitconvert operator

* rename noop to senmerc

* update changelog
  • Loading branch information
Rennzie committed Nov 24, 2023
1 parent 82f9ef0 commit d7178b8
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 392 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Grids are stored in globally allocated heap memory [#34](https://github.com/Rennzie/geodesy-wasm/issues/34)
- Lazily initialise the operator so grids can be registered after it's created
- Lazily initialise the operator so grids can be registered after creation
- Renamed `noop` operator to `senmerc` in anticipation of adding a Sensat Mercator operator

### Removed

- The `unitconvert` operator which was implemented upstream in [Geodesy:#80](https://github.com/busstoptaktik/geodesy/pull/80)

## [0.5.0] - 2023-11-17

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ default = ["console_error_panic_hook", "console_log"]
[dependencies]
wasm-bindgen = "0.2.86"

geodesy_rs = { package = "geodesy", git = "https://github.com/Rennzie/geodesy.git", rev = "17d04f29b2d28f72ee83006f654aaf3664839456", version = "0.10.0", features = [
geodesy_rs = { package = "geodesy", git = "https://github.com/Rennzie/geodesy.git", rev = "499f17952fa21a49a0e6a0a3d4cd35ab17c1bd1f", features = [
"js",
] }

Expand Down
17 changes: 3 additions & 14 deletions src/geodesy/operators/mod.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
mod noop;
mod unitconvert;
pub mod units;
mod senmerc;

use geodesy_rs::authoring::*;

#[rustfmt::skip]
pub const ACCESSORY_OPERATORS: [(&str, OpConstructor); 5] = [
("unitconvert", OpConstructor(unitconvert::new)),
// As far as I can tell the `longlat` operator is a no-op.
// - https://proj.org/en/9.3/operations/conversions/latlon.html
// - https://github.com/OSGeo/PROJ/blob/2040e685f5ab9c2958b7b611f5aaafee21fed82f/src/projections/latlong.cpp#L94
// My assumption is it's for historical reasons, so in geodesy-wasm it's just a noop.
("longlat", OpConstructor(noop::new)),
// And Aliases latlon, latlong, lonlat
("latlon", OpConstructor(noop::new)),
("latlong", OpConstructor(noop::new)),
("lonlat", OpConstructor(noop::new)),
pub const ACCESSORY_OPERATORS: [(&str, OpConstructor); 1] = [
("senmerc", OpConstructor(senmerc::new)),
];
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// No-op operator which is the same as the RG one.
/// Unfortunately the RG one is not exported so I've re-created it here for internal use
/// I assume this is for legacy PROJ reasons therefore in geodesy-wasm latlong is a no-op.
/// An as yet undefined `Sensat Mercator` operator.
/// Webmercator with a scaling applied to the z coordinate.
use geodesy_rs::authoring::*;

// ----- C O M M O N -------------------------------------------------------------------
Expand Down
301 changes: 0 additions & 301 deletions src/geodesy/operators/unitconvert.rs

This file was deleted.

0 comments on commit d7178b8

Please sign in to comment.