pub struct Equirectangular;Expand description
Equirectangular projection: trivial linear mapping of lon/lat to meters.
Uses the WGS-84 semi-major axis (R = 6 378 137 m) as the scaling
factor so that output units are meters at the equator. This is a
zero-size type – construction is free.
Trait Implementations§
Source§impl Projection for Equirectangular
impl Projection for Equirectangular
Source§fn project(&self, geo: &GeoCoord) -> WorldCoord
fn project(&self, geo: &GeoCoord) -> WorldCoord
Forward projection: geographic degrees to world meters.
x = R * lon_rad, y = R * lat_rad, z = alt (passthrough).
Source§fn unproject(&self, world: &WorldCoord) -> GeoCoord
fn unproject(&self, world: &WorldCoord) -> GeoCoord
Inverse projection: world meters back to geographic degrees.
lat = degrees(y / R), lon = degrees(x / R), alt = z.
Source§fn scale_factor(&self, geo: &GeoCoord) -> f64
fn scale_factor(&self, geo: &GeoCoord) -> f64
Scale factor for Equirectangular: sec(lat) = 1 / cos(lat).
The projection maps longitude linearly, so X distances are
stretched relative to true distances by sec(lat), the same
as the meridian convergence factor. Along Y the scale is 1.0,
so this returns the maximum linear distortion at the point.