pub struct GeoLocation {
pub longitude: DmsCoordinate,
pub latitude: DmsCoordinate,
pub geodetic_system: Option<String>,
}Expand description
緯度経度情報
Fields§
§longitude: DmsCoordinate経度(度分秒)
latitude: DmsCoordinate緯度(度分秒)
geodetic_system: Option<String>測地系コード
Implementations§
Source§impl GeoLocation
impl GeoLocation
Sourcepub fn to_wgs84(&self, transformer: &JgdTransformer) -> Option<(f64, f64)>
pub fn to_wgs84(&self, transformer: &JgdTransformer) -> Option<(f64, f64)>
WGS84座標系に変換した座標を取得
国土地理院のTKY2JGD/PatchJGDパラメータを使用して Tokyo Datum/JGD2000 → JGD2011 → WGS84 の変換を行う。
§Arguments
transformer- JgdTransformer インスタンス
§Returns
Some((経度, 緯度)) - WGS84座標系での10進数座標
None - 座標が取得できない場合
§Example
ⓘ
let transformer = JgdTransformer::new("TKY2JGD.par", "patch_files")?;
let (lng, lat) = location.to_wgs84(&transformer)?;Sourcepub fn to_decimal(&self) -> Option<(f64, f64)>
pub fn to_decimal(&self) -> Option<(f64, f64)>
Sourcepub fn datum(&self) -> GeodeticDatum
pub fn datum(&self) -> GeodeticDatum
測地系を取得
Trait Implementations§
Source§impl Clone for GeoLocation
impl Clone for GeoLocation
Source§fn clone(&self) -> GeoLocation
fn clone(&self) -> GeoLocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GeoLocation
impl Debug for GeoLocation
Source§impl PartialEq for GeoLocation
impl PartialEq for GeoLocation
impl StructuralPartialEq for GeoLocation
Auto Trait Implementations§
impl Freeze for GeoLocation
impl RefUnwindSafe for GeoLocation
impl Send for GeoLocation
impl Sync for GeoLocation
impl Unpin for GeoLocation
impl UnsafeUnpin for GeoLocation
impl UnwindSafe for GeoLocation
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