SYNOPSIS

 use Geo::Proj;

 my $wgs84 = Geo::Proj->new   # predefined if import()
  ( nick  => 'wgs84'
  , proj4 => '+proj=latlong +datum=WGS84 +ellps=WGS84'
  );

 my $clrk = Geo::Proj->new
  ( nick  => 'clark66'
  , proj4 => [proj => "merc", ellps => "clrk66", lon_0 => -96]
  );

 my $point_wgs84= Geo::Point->latlong(56.12, 4.40, 'wgs84');
 my $point_wgs84= Geo::Point->latlong(56.12, 4.40, $wgs84);

 my $point_clrk = $point_wgs84->to($clrk);
 my $point_clrk = Geo::Proj->to($clrk, $point_wgs84);
 my $point_clrk = Geo::Proj->to('clark66', $point_wgs84);

DESCRIPTION

A point on Earth's surface can be represented in many different coordinate systems. The Geo::Proj4 module wraps the popular Open Source libproj library to convert between those coordinate systems; a very complex job.

Within a program, however, you like some extra abstraction from that library: to be able to simply label a point to its system, and then forget about all transformations which may be necessary. The label (or nick) hides all complicated parameters for the actual projection .

WARNING 1: this class will collect all nicks, which means that calling new() with the same label twice will have the second ignored.

WARNING 2: the wgs84 nickname is predefined, but only if this module is 'used' with import. So if you decide to use 'require' to dynamically load this module, then don't forget to call 'import()' yourself, or define the wgs84 projection yourself.