| Astro-MapProjection documentation | view source | Contained in the Astro-MapProjection distribution. |
Astro::MapProjection - A few simple map projections (Hammer, sinusoidal, ...)
use Astro::MapProjection qw/miller_projection hammer_projection sinusoidal_projection/; my ($x, $y) = hammer_projection($latitude, $longitude);
Simple XS module that implements a few map projections (see below). Let me know if you need any others.
None by default. You can choose to import the following functions:
miller_projection hammer_projection sinusoidal_projection
An equal area map projection after Ernst Hammer.
x = 2*sqrt(2) * cos(lat)*sin(long/2) /
sqrt(1+cos(lat)*cos(long/2))
y = sqrt(2)*sin(lat) /
sqrt(1+cos(lat)*cos(long/2))
Pseudocylindrical equal-area map projection. Also called Sanson-Flamsteed or Mercartor equal-area projection.
x = (long-long_0)*cos(lat) y = lat
x = long y = 5/4 * ln(tan(pi/4 + 2/5 * lat))
For more general information on map projections: http://en.wikipedia.org/wiki/Map_projection
Steffen Mueller, <smueller@cpan.org>
Copyright (C) 2009 by Steffen Mueller
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available.
| Astro-MapProjection documentation | view source | Contained in the Astro-MapProjection distribution. |