Struct Tokyo

Source
pub struct Tokyo { /* private fields */ }
Expand description

Tokyo Datum, The older Japanese Datum.

旧日本測地系。

EPSG: 4301

Implementations§

Source§

impl Tokyo

Source

pub fn new(degrees: LatLon) -> Result<Self, DegreesError>

Constructs a Tokyo with a coordinate in degrees.

§Errors

Returns DegreesError if the LatLon is out of range in degrees.

§Examples
let jgd2011 = Tokyo::new(LatLon(35.0, 135.0))?.to_jgd2000().to_jgd2011();
Source

pub fn to_jgd2000(&self) -> Jgd2000

Available on crate feature tky2jgd only.

Transforms to Jgd2000.

TKY2JGD を用いて変換される。精度は、一定の条件下で 「緯度, 経度の標準偏差はそれぞれ9cm, 8cm」(飛田, 2001)

ただし、TKY2JGD の範囲外では Tokyo97::to_jgd2000 によって変換され、精度が大きく下がる。

日本国内の地表面の座標のみに使用可能。地中や空中ではズレが大きくなる。

§Examples
let LatLon(lat, lon) = tokyo.to_jgd2000().degrees();
Source

pub fn degrees(&self) -> LatLon

Returnes coordinate in degrees.

§Examples
let LatLon(lat, lon) = tokyo.degrees();

Trait Implementations§

Source§

impl Debug for Tokyo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Tokyo

§

impl RefUnwindSafe for Tokyo

§

impl Send for Tokyo

§

impl Sync for Tokyo

§

impl Unpin for Tokyo

§

impl UnwindSafe for Tokyo

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.