Search notes:

Perl module Geo::Coordinates::Transform

#!/usr/bin/perl
use warnings; use strict;
use Geo::Coordinates::Transform;

my $g = Geo::Coordinates::Transform->new();

printf "%s\n", @{$g->cnv_to_dms([ 20.5     ])}[0];   # 20 30 0.00000
printf "%s\n", @{$g->cnv_to_ddm([ 20.5     ])}[0];   # 20 30.00000
printf "%s\n", @{$g->cnv_to_dd (["20 30 0" ])}[0];   # 20.5000000
printf "%s\n", @{$g->cnv_to_dd (["20 30 12"])}[0];   # 20.5033333
Github repository PerlModules, path: /Geo/Coordinates/Transform/script.pl

Problem with small numbers

#!/usr/bin/perl
use warnings; use strict;
use Geo::Coordinates::Transform;


my $g = Geo::Coordinates::Transform->new();


print  "\n\n";

print  ${$g->cnv_to_dms([ '0.0000999' ])}[0];   # 0 0 0.35964
print  "\n";
print  ${$g->cnv_to_dms([ '0.0001000' ])}[0];   # 0 0 0.36000

print  "\n\n";

print  ${$g->cnv_to_dms([  0.0000999  ])}[0];   # NaN         (and Illegal char in 9.99e-005 at .../site/lib/Geo/Coordinates/Transform.pm line 71.)
print  "\n";
print  ${$g->cnv_to_dms([  0.0001000  ])}[0];   # 0 0 0.36000


print  "\n\n";
Github repository PerlModules, path: /Geo/Coordinates/Transform/small_number.pl

See also

Perl modules

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1741107660, '3.147.70.101', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/Geo/Coordinates/Transform/index(75): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78