File: sample.pl

package info (click to toggle)
libgeo-proj4-perl 1.05-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 164 kB
  • ctags: 232
  • sloc: ansic: 362; perl: 347; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 385 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl

use strict;
use warnings;

use Geo::Proj4;

my $proj = Geo::Proj4->new( proj => "utm", zone => 10 );
my ($x, $y) = $proj->forward(38.40342, -122.81856);
print "conversion to UTM: y is  $y\n";
print "conversion to UTM: x is  $x\n";

my ($lat, $long) = $proj->inverse($x, $y);
print "inverse conversion: lat is $lat \n" ;
print "inverse conversion: long is $long \n" ;