search.cpan.org is shutting down
Steffen Müller > Astro-MapProjection > Astro::MapProjection
Module Version: 0.01

# NAME

Astro::MapProjection - A few simple map projections (Hammer, sinusoidal, ...)

# SYNOPSIS

```  use Astro::MapProjection qw/miller_projection hammer_projection sinusoidal_projection/;
my (\$x, \$y) = hammer_projection(\$latitude, \$longitude);```

# DESCRIPTION

Simple XS module that implements a few map projections (see below). Let me know if you need any others.

## EXPORT

None by default. You can choose to import the following functions:

```  miller_projection
hammer_projection
sinusoidal_projection```

# PROJECTIONS

## Hammer 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

## Sinusoidal 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

## Miller cylindrical 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

# AUTHOR

Steffen Mueller, <smueller@cpan.org>