Skip to content

Commit

Permalink
Comment to unused fn
Browse files Browse the repository at this point in the history
  • Loading branch information
p4ken committed Jul 21, 2024
1 parent bd4d51f commit 98474b5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 29 deletions.
46 changes: 19 additions & 27 deletions src/crs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl Tokyo {
/// [`TKY2JGD`] を用いて変換される。精度は、一定の条件下で
/// 「緯度, 経度の標準偏差はそれぞれ9cm, 8cm」[(飛田, 2001)](crate#references)。
///
/// ただし、[`TKY2JGD`] の範囲外では [`Tokyo97`] を経由して数式によって変換され、精度が大きく下がる。
/// ただし、[`TKY2JGD`] の範囲外では [`Tokyo97::to_jgd2000`] によって変換され、精度が大きく下がる。
///
/// 日本国内の地表面の座標のみに使用可能。地中や空中ではズレが大きくなる。
///
Expand All @@ -53,16 +53,12 @@ impl Tokyo {
pub fn to_jgd2000(&self) -> Jgd2000 {
match TKY2JGD.bilinear(self.degrees) {
Some(shift) => Jgd2000::new(self.degrees + shift),
None => self._to_tokyo97().to_jgd2000(),
None => Tokyo97::new(self.degrees).to_jgd2000(),
}
}

/// 離島位置の補正量 [(飛田, 2003)](crate#references) を用いて [`Tokyo97`] へ変換する。
fn _to_tokyo97(&self) -> Tokyo97 {
// TODO
// https://support.e-map.ne.jp/files/V30/Solitaryisland.pdf
Tokyo97::new(self.degrees)
}
/// Transforms to [`Tokyo97`].
fn _to_tokyo97(&self) {}

/// Returnes coordinate in degrees.
///
Expand Down Expand Up @@ -129,12 +125,7 @@ impl Tokyo97 {
}

/// Inverse of [`Tokyo::to_tokyo97`].
///
/// 離島位置の補正量 [(飛田, 2003)](crate#references) を用いて [`Tokyo`] へ逆変換する。
fn _to_tokyo(&self) -> Tokyo {
// TODO
Tokyo::new(self.degrees)
}
fn _to_tokyo(&self) {}

/// Returnes coordinate in degrees.
///
Expand Down Expand Up @@ -193,14 +184,14 @@ impl Jgd2000 {
Jgd2011::new(self.degrees + shift)
}

/// [`TKY2JGD`] を用いて [`Tokyo`] へ逆変換する。
/// Inverse of [`Tokyo::to_jgd2000`].
fn _to_tokyo(&self) {}
fn _to_tokyo(&self) {
// グリッドのキーは日本測地系だが、求めたいのも日本測地系なので、矛盾している。
// オリジナルの実装 modTky2jgd.bas:1108 は、精度や対応範囲を割り切っている。
}

/// Inverse of [`Tokyo97::to_jgd2000`].
///
/// 3パラメータを用いて [`Tokyo97`] へ逆変換する。
///
/// # Examples
///
/// ```
Expand Down Expand Up @@ -243,8 +234,12 @@ impl Jgd2011 {
Self { degrees }
}

/// [`TOUHOKUTAIHEIYOUOKI2011`] を用いて [`Jgd2000`] へ逆変換する。
fn _to_jgd2000(&self) {}
/// Inverse of [`Jgd2000::to_jgd2011`].
///
/// [`TOUHOKUTAIHEIYOUOKI2011`] を用いて逆変換される。
fn _to_jgd2000(&self) {
// Jgd2000::_to_tokyo() と同様の課題あり
}

/// Returnes coordinate in degrees.
///
Expand All @@ -261,10 +256,7 @@ impl Jgd2011 {
}
}

// /// 平面直角座標系
// // https://vldb.gsi.go.jp/sokuchi/surveycalc/surveycalc/algorithm/xy2bl/xy2bl.htm
// // https://sw1227.hatenablog.com/entry/2018/11/30/200702
// struct _PlaneRectangular<T>(T);

// /// Webメルカトル座標系
// struct _WebMercator<T>(T);
/// 平面直角座標系
// https://vldb.gsi.go.jp/sokuchi/surveycalc/surveycalc/algorithm/xy2bl/xy2bl.htm
// https://sw1227.hatenablog.com/entry/2018/11/30/200702
struct _PlaneRectangular {}
2 changes: 0 additions & 2 deletions src/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ impl<'a> Grid<'a> {
}

/// Nearest-neighbor interpolation.
///
/// 最近傍補間。
fn _nearest(&self, _degrees: LatLon, _limit: f64) -> LatLon {
todo!()
}
Expand Down
5 changes: 5 additions & 0 deletions src/island.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// 離島位置の補正量 [(飛田, 2003)](crate#references)
//
// どこが石垣島か? といった範囲を自前で判定する必要がある。
// 2次メッシュで決める例:
// https://support.e-map.ne.jp/files/V30/Solitaryisland.pdf

0 comments on commit 98474b5

Please sign in to comment.