pub struct JgdTransformer { /* private fields */ }Expand description
JGD2011座標変換器
Tokyo Datum/JGD2000からJGD2011への変換を行う。
- Step 1: Tokyo Datum → JGD2000 (TKY2JGD)
- Step 2: JGD2000 → JGD2011 (PatchJGD統合)
- Step 3: JGD2011 → WGS84 (proj)
Implementations§
Source§impl JgdTransformer
impl JgdTransformer
Sourcepub fn with_survey_date<P: AsRef<Path>>(
tky_path: P,
patch_dir: P,
survey_date: SurveyStartDate,
) -> Result<Self, TransformError>
pub fn with_survey_date<P: AsRef<Path>>( tky_path: P, patch_dir: P, survey_date: SurveyStartDate, ) -> Result<Self, TransformError>
パラメータファイルを読み込んで変換器を初期化(調査日指定あり)
§Arguments
tky_path- TKY2JGD.par のパスpatch_dir- PatchJGD系ファイルが入ったディレクトリのパスsurvey_date- 調査日(地震補正の適用判定に使用)
§地震補正の適用ルール
- 調査日が地震発生日より前の場合のみ、その地震の補正を適用
- 調査日が地震発生日より後の場合、補正は適用しない(既に変動後の位置)
- ジオイド補正(hyokorev2014_geoid2011_h.par)は常に適用
§Example
ⓘ
let survey_date = SurveyStartDate::new(2010, 5, 15);
let transformer = JgdTransformer::with_survey_date(
"params/TKY2JGD.par",
"params/patch_files",
survey_date
)?;Sourcepub fn new<P: AsRef<Path>>(
tky_path: P,
patch_dir: P,
) -> Result<Self, TransformError>
pub fn new<P: AsRef<Path>>( tky_path: P, patch_dir: P, ) -> Result<Self, TransformError>
パラメータファイルを読み込んで変換器を初期化(調査日なし)
注意: 調査日が不明な場合、地震補正は適用されません。 ジオイド補正のみが適用されます。
§Arguments
tky_path- TKY2JGD.par のパスpatch_dir- PatchJGD系ファイルが入ったディレクトリのパス
Sourcepub fn new_tky_only<P: AsRef<Path>>(tky_path: P) -> Result<Self, TransformError>
pub fn new_tky_only<P: AsRef<Path>>(tky_path: P) -> Result<Self, TransformError>
TKY2JGDのみで変換器を初期化 (PatchJGDファイルなし)
JGD2000→JGD2011変換が不要な場合に使用
Sourcepub fn transform_horizontal(
&self,
lat: f64,
lon: f64,
system_code: &str,
) -> Option<(f64, f64)>
pub fn transform_horizontal( &self, lat: f64, lon: f64, system_code: &str, ) -> Option<(f64, f64)>
Sourcepub fn transform_full(
&self,
lat: f64,
lon: f64,
alt: f64,
system_code: &str,
) -> Result<(f64, f64, f64), TransformError>
pub fn transform_full( &self, lat: f64, lon: f64, alt: f64, system_code: &str, ) -> Result<(f64, f64, f64), TransformError>
Auto Trait Implementations§
impl !Send for JgdTransformer
impl !Sync for JgdTransformer
impl Freeze for JgdTransformer
impl RefUnwindSafe for JgdTransformer
impl Unpin for JgdTransformer
impl UnsafeUnpin for JgdTransformer
impl UnwindSafe for JgdTransformer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more