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))
http://en.wikipedia.org/wiki/Hammer_projection
Pseudocylindrical equal-area map projection. Also called Sanson-Flamsteed or Mercartor equal-area projection.
x = (long-long_0)*cos(lat) y = lat
http://en.wikipedia.org/wiki/Sinusoidal_projection
x = long y = 5/4 * ln(tan(pi/4 + 2/5 * lat))
http://en.wikipedia.org/wiki/Miller_cylindrical_projection
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.
To install Astro::MapProjection, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Astro::MapProjection
CPAN shell
perl -MCPAN -e shell install Astro::MapProjection
For more information on module installation, please visit the detailed CPAN module installation guide.