Skip to content

Commit

Permalink
lat_lon only api
Browse files Browse the repository at this point in the history
  • Loading branch information
p4ken committed Jun 10, 2024
1 parent d86cd4a commit 0306b2a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/crs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ impl Jgd2011 {
self.lat_lon.into()
}

pub fn lon_lat(&self) -> (f64, f64) {
self.lat_lon.rev()
}
// pub fn lon_lat(&self) -> (f64, f64) {
// self.lat_lon.rev()
// }

/// `touhokutaiheiyouoki2011.par` を用いて [`JGD2000`] へ逆変換する
pub fn to_jgd2000(&self) {}
Expand Down
13 changes: 6 additions & 7 deletions tests/draft.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![cfg(feature = "default")]

use geo::Point;
use geo::{Coord, Line, MapCoords, Point};
use jgd::Tokyo;

fn api_usage() {
Expand All @@ -12,10 +12,9 @@ fn api_usage() {
.to_jgd2011()
.lat_lon();

let p = Point::from([2.0, 1.0]);
let Point(_) = jgd::from_tokyo(p.y(), p.x())
.to_jgd2000()
.to_jgd2011()
.lon_lat()
.into();
let line = Line::new([0., 0.].into(), [2., 1.]);
let line = line.map_coords(|Coord { x, y }| {
let (y, x) = jgd::from_tokyo(y, x).to_jgd2000().to_jgd2011().lat_lon();
Coord { x, y }
});
}

0 comments on commit 0306b2a

Please sign in to comment.