Trait proj::Coord [−][src]
A point in two dimensional space. The primary unit of input/output for proj.
By default, any numeric (x, y)
tuple implements Coord
, but you can conform your type to
Coord
to pass it directly into proj.
See the geo-types
feature for interop with the geo-types
crate
Required methods
Loading content...Implementations on Foreign Types
impl<T: CoordinateType> Coord<T> for Coordinate<T>
[src]
extern crate proj; use proj::Proj; use geo_types::Coordinate; let from = "EPSG:2230"; let to = "EPSG:26946"; let nad_ft_to_m = Proj::new_known_crs(&from, &to, None).unwrap(); let result = nad_ft_to_m .convert(Coordinate { x: 4760096.421921f64, y: 3744293.729449f64 }) .unwrap(); assert_relative_eq!(result.x, 1450880.29f64, epsilon=1.0e-2); assert_relative_eq!(result.y, 1141263.01f64, epsilon=1.0e-2);
impl<T: CoordinateType> Coord<T> for Point<T>
[src]
extern crate proj; use proj::Proj; use geo_types::Point; let from = "EPSG:2230"; let to = "EPSG:26946"; let nad_ft_to_m = Proj::new_known_crs(&from, &to, None).unwrap(); let result = nad_ft_to_m .convert(Point::new(4760096.421921f64, 3744293.729449f64)) .unwrap(); assert_relative_eq!(result.x(), 1450880.29f64, epsilon=1.0e-2); assert_relative_eq!(result.y(), 1141263.01f64, epsilon=1.0e-2);