Subject: | Mismatch in Arguments between Geo::Proj->to and Geo::Proj4->transform |
Date: | Thu, 16 Jul 2009 15:38:24 -0700 |
To: | bug-Geo-Point [...] rt.cpan.org |
From: | don <don_reid [...] comcast.net> |
Geo::Proj->to is calling $myproj4->transform with its remaining
arguments, but Geo::Proj4->transform is lloking for a reference to an
array.
I tried changing it to:
$myproj4->transform($toproj4, \@_);
But then I get an error:
Argument "point[wgs84](44.0196 -121.7903)" isn't numeric in subroutine entry at
/home/dreid/apps/lib/perl5/x86_64-linux-thread-multi/Geo/Proj4.pm line 114.
I'm not sure what the code in transform is doing, after checking that
$points is an array reference, it looks for the first element to be
another array reference?? Is this usage right for a simple transform?
$wgs84 = Geo::Proj->projection('wgs84');
$nad27 = Geo::Proj->new (
nick => 'nad27',
proj4 => '+proj=latlong +datum=NAD27 +ellps=clrk66',
) or die;
$p = Geo::Point->latlong(44.0196, -121.7903, 'wgs84');
$q = $wgs84->to($nad27, $p);
--
Don Reid