Hello community,

here is the log from the commit of package perl-Geo-Coordinates-UTM for 
openSUSE:Factory checked in at 2013-06-06 12:20:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Geo-Coordinates-UTM (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Geo-Coordinates-UTM.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Geo-Coordinates-UTM"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Geo-Coordinates-UTM/perl-Geo-Coordinates-UTM.changes
        2011-11-21 12:40:36.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.perl-Geo-Coordinates-UTM.new/perl-Geo-Coordinates-UTM.changes
   2013-06-06 12:20:20.000000000 +0200
@@ -1,0 +2,10 @@
+Wed Jun  5 05:44:50 UTC 2013 - [email protected]
+
+- update to 0.11
+       - fixed error in Everest Pakistan ellipsoid axis
+       - Added Arc 1950 ellipsoid
+       - patched MGRS calculations for S. Hemisphere
+       - Added MGRS tests
+       - Added NAD27 and NAD83 ellipsoids
+
+-------------------------------------------------------------------

Old:
----
  Geo-Coordinates-UTM-0.09.tar.gz

New:
----
  Geo-Coordinates-UTM-0.11.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Geo-Coordinates-UTM.spec ++++++
--- /var/tmp/diff_new_pack.NFwE0k/_old  2013-06-06 12:20:21.000000000 +0200
+++ /var/tmp/diff_new_pack.NFwE0k/_new  2013-06-06 12:20:21.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Geo-Coordinates-UTM
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,18 +15,16 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-# norootforbuild
-
 
 Name:           perl-Geo-Coordinates-UTM
 %define cpan_name Geo-Coordinates-UTM
-Summary:        Perl extension for Latitiude Longitude conversions
-Version:        0.09
-Release:        1
+Summary:        Perl extension for Latitude Longitude conversions
 License:        GPL-1.0+ or Artistic-1.0
 Group:          Development/Libraries/Perl
+Version:        0.11
+Release:        0
 Url:            http://search.cpan.org/dist/Geo-Coordinates-UTM/
-Source:         
http://www.cpan.org/modules/by-module/Geo/Geo-Coordinates-UTM-0.09.tar.gz
+Source:         
http://www.cpan.org/authors/id/G/GR/GRAHAMC/%{cpan_name}-%{version}.tar.gz
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %{perl_requires}
@@ -39,10 +37,6 @@
 This module will translate latitude longitude coordinates to Universal
 Transverse Mercator(UTM) coordinates and vice versa.
 
-Authors:
---------
-    Graham Crookham <[email protected]>
-
 %prep
 %setup -q -n %{cpan_name}-%{version}
 ### rpmlint:

++++++ Geo-Coordinates-UTM-0.09.tar.gz -> Geo-Coordinates-UTM-0.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Geo-Coordinates-UTM-0.09/Changes 
new/Geo-Coordinates-UTM-0.11/Changes
--- old/Geo-Coordinates-UTM-0.09/Changes        2010-05-17 17:31:38.000000000 
+0200
+++ new/Geo-Coordinates-UTM-0.11/Changes        2013-05-21 14:26:43.000000000 
+0200
@@ -1,4 +1,4 @@
-Revision history for Perl extension Geo::Coord.
+Revision history for Perl extension Geo::Coordinates::UTM.
 
 0.01  Wed Sep 27 12:37:38 2000
        - original version; created by h2xs 1.19
@@ -23,7 +23,15 @@
        - Addition of new ellipsoids
        - Refinement of MGRS calculations
        - Addition of latlon_to_utm_force_zone 
-0.08  Thu Dec 06 17:15:03
+0.08  Thu Dec 06 17:15:03 2007
        - Refinement of MGRS calculations
-0.09  Mon May 17 16:30:32
+0.09  Mon May 17 16:30:32 2010
        - Patched mgrs_to_utm to handle short MGRS strings
+0.10 Mon Mar 25 19:05:12 2013
+       - fixed error in Everest Pakistan ellipsoid axis
+       - Added Arc 1950 ellipsoid
+       - patched MGRS calculations for S. Hemisphere
+       - Added MGRS tests
+0.11 Tue May 21 13:26:14 2013
+       - Added NAD27 and NAD83 ellipsoids
+       
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Geo-Coordinates-UTM-0.09/MANIFEST 
new/Geo-Coordinates-UTM-0.11/MANIFEST
--- old/Geo-Coordinates-UTM-0.09/MANIFEST       2010-05-17 15:07:32.000000000 
+0200
+++ new/Geo-Coordinates-UTM-0.11/MANIFEST       2013-03-25 21:08:13.000000000 
+0100
@@ -5,4 +5,5 @@
 README
 t/01_basic_settings.t
 t/02_points.t
+t/03_mgrs.t
 META.yml                                 Module meta-data (added by MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Geo-Coordinates-UTM-0.09/META.yml 
new/Geo-Coordinates-UTM-0.11/META.yml
--- old/Geo-Coordinates-UTM-0.09/META.yml       2010-05-17 17:31:48.000000000 
+0200
+++ new/Geo-Coordinates-UTM-0.11/META.yml       2013-05-21 14:29:26.000000000 
+0200
@@ -1,21 +1,21 @@
---- #YAML:1.0
-name:               Geo-Coordinates-UTM
-version:            0.09
-abstract:           Convert LatLon to UTM and vice versa
-author:
-    - Graham Crookham ([email protected])
-license:            unknown
-distribution_type:  module
-configure_requires:
-    ExtUtils::MakeMaker:  0
-build_requires:
-    ExtUtils::MakeMaker:  0
-requires:  {}
-no_index:
-    directory:
-        - t
-        - inc
-generated_by:       ExtUtils::MakeMaker version 6.55_02
-meta-spec:
-    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
-    version:  1.4
+--- #YAML:1.0
+name:               Geo-Coordinates-UTM
+version:            0.11
+abstract:           Convert LatLon to UTM and vice versa
+author:
+    - Graham Crookham ([email protected])
+license:            unknown
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
+requires:  {}
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.55_02
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Geo-Coordinates-UTM-0.09/README 
new/Geo-Coordinates-UTM-0.11/README
--- old/Geo-Coordinates-UTM-0.09/README 2010-05-17 16:37:55.000000000 +0200
+++ new/Geo-Coordinates-UTM-0.11/README 2013-05-21 14:27:05.000000000 +0200
@@ -137,6 +137,9 @@
     27 Everest 1969 Malaysia
     28 Everest Pakistan
     29 Indonesian 1974
+       30 Arc 1950
+       31 NAD 27
+       32 NAD 83
 
   ellipsoid_names
 
@@ -289,7 +292,7 @@
     Peder Stray for the short MGRS patch
 
 COPYRIGHT
-    Copyright (c) 2000,2002,2004,2007,2010 by Graham Crookham. All rights 
reserved.
+    Copyright (c) 2000,2002,2004,2007,2010,2013 by Graham Crookham. All rights 
reserved.
 
     This package is free software; you can redistribute it and/or modify it
     under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Geo-Coordinates-UTM-0.09/UTM.pm 
new/Geo-Coordinates-UTM-0.11/UTM.pm
--- old/Geo-Coordinates-UTM-0.09/UTM.pm 2010-05-17 17:30:32.000000000 +0200
+++ new/Geo-Coordinates-UTM-0.11/UTM.pm 2013-05-21 14:26:14.000000000 +0200
@@ -12,7 +12,7 @@
                    latlon_to_mgrs mgrs_to_utm mgrs_to_latlon
                   ellipsoid_info ellipsoid_names );
 
-our $VERSION = '0.09';
+our $VERSION = '0.11';
 
 use Math::Trig;
 my $deg2rad =  pi / 180;
@@ -66,8 +66,20 @@
     , [ "Everest 1969 Malaysia", 6377296, 0.006637847]
     , [ "Everest Pakistan", 6377296, 0.006637534]
     , [ "Indonesian 1974", 6378160, 0.006694609]
+       , [ "Arc 1950", 6378249.145,0.006803481]
+       , [ "NAD 27",6378206.4,0.006768658]
+       , [ "NAD 83",6378137,0.006694384]
     );
 
+# calc ecc  as  
+# a = semi major axis
+# b = semi minor axis
+# e^2 = (a^2-b^2)/a^2  
+# For clarke 1880 (Arc1950) a=6378249.145 b=6356514.966398753
+# e^2 (40682062155693.23 - 40405282518051.34) / 40682062155693.23
+# e^2 = 0.0068034810178165
+       
+
   foreach my $el (@Ellipsoid)
   {   my ($name, $eqrad, $eccsq) = @$el;
       $Ellipsoid{$name} = $el;
@@ -279,7 +291,7 @@
      unless _valid_utm_zone $zone_letter;
 
    my $northing_zones="ABCDEFGHJKLMNPQRSTUV";
-   my $rnd_north=sprintf("%.0f",$northing);
+   my $rnd_north=sprintf("%d",$northing);
    my $north_split=length($rnd_north)-5;
    $north_split=0 if $north_split < 0;
    my $mgrs_north=substr($rnd_north,(length($rnd_north)-5));
@@ -290,7 +302,7 @@
    $num_north-=20 until $num_north <20;
    my $lett_north=substr($northing_zones,$num_north,1);
 
-   my $rnd_east=sprintf("%.0f",$easting);
+   my $rnd_east=sprintf("%d",$easting);
    my $east_split=length($rnd_east)-5;
    $east_split=0 if $east_split < 0;
    my $mgrs_east=substr($rnd_east,(length($rnd_east)-5));
@@ -322,8 +334,9 @@
 
 sub mgrs_to_utm($)
 {  my ($mgrs_string) = @_;
-
-   my $zone = substr($mgrs_string,0,3);
+   my $zone = substr($mgrs_string,0,2);
+   $mgrs_string = "0$mgrs_string" if !($zone =~ /^\d+$/);
+   $zone = substr($mgrs_string,0,3);
    my $zone_number = $zone;
    my $zone_letter = chop $zone_number;
 
@@ -379,16 +392,14 @@
    }
    else {
        #Southern Hemisphere
-       #my $tmpNorth=index('MLKJHGFEDC',$zone_letter);
        my $tmpNorth=index('CDEFGHJKLM',$zone_letter);
-       $tmpNorth++;
        $tmpNorth*=8;
        $tmpNorth*=10/9;
        $tmpNorth=int((($tmpNorth-$north_pos)/20)+0.5)*20;
        $north_pos+=$tmpNorth;
        $north_pos*=100000;
        $north_pos-=100000;
-       $north_pos+=2000000;
+       $north_pos+=2000000 if $zone_letter ne "C";
        $y_coord+=$north_pos;
    }
 
@@ -531,6 +542,12 @@
 
 =item 29 Indonesian 1974
 
+=item 30 Arc 1950
+
+=item 30 NAD 27
+
+=item 30 NAD 83
+
 =back
 
 
@@ -695,7 +712,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (c) 2000,2002,2004,2007,2010 by Graham Crookham.  All rights 
reserved.
+Copyright (c) 2000,2002,2004,2007,2010,2013 by Graham Crookham.  All rights 
reserved.
     
 This package is free software; you can redistribute it
 and/or modify it under the same terms as Perl itself.             
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Geo-Coordinates-UTM-0.09/t/03_mgrs.t 
new/Geo-Coordinates-UTM-0.11/t/03_mgrs.t
--- old/Geo-Coordinates-UTM-0.09/t/03_mgrs.t    1970-01-01 01:00:00.000000000 
+0100
+++ new/Geo-Coordinates-UTM-0.11/t/03_mgrs.t    2013-03-25 21:01:09.000000000 
+0100
@@ -0,0 +1,76 @@
+#!/usr/bin/perl
+
+use Test::More tests =>118;
+BEGIN { use_ok ('Geo::Coordinates::UTM'); }
+
+use constant maxerror => 1e-2;
+
+use warnings;
+use strict;
+
+sub fleq ($$;$) {
+    if (abs($_[0] - $_[1]) < maxerror) {
+        pass($_[2]);
+    }
+    else {
+        fail($_[2]);
+        diag("floating point value $_[0] too different to reference $_[1]");
+    }
+}
+
+my $latlon = "CCDEFGHJKLMNPQRSTUVWXX";
+
+while(<DATA>) {
+    chomp;
+    next if /^\s*(?:#.*)?$/;
+
+    my ($ellipsoid, $latitude, $longitude, $mgrs) = split /\|/;
+    my ($m) = latlon_to_mgrs($ellipsoid, $latitude, $longitude);
+    is($m, $mgrs, "MGRS $.");
+
+    my ($lat, $lon) = mgrs_to_latlon($ellipsoid, $m);
+    fleq($lon, $longitude, "longitude $.");
+    fleq($lat, $latitude, "latitude $.");
+}
+
+__DATA__
+# ellipsoid|latitude|longitude|mgrs
+WGS-84|-15.038207087342|-169.633239244409|2LPJ4692336993
+Airy|-62.664347298066|-18.1318011641218|27EXL4689749077
+Bessel 1841 Nambia|-25.9668774017417|176.847283481794|60JVS8471328217
+Fischer 1968|35.6355896701843|-128.779407270838|9SWV1997243564
+Clarke 1880|-23.7249091815666|-58.725260492694|21KUP2412875382
+Clarke 1880|32.1214082107167|39.4139996279968|37SER3905453697
+Everest 1830 India|-77.8630147119741|-167.673126297052|3CVP3729056475
+Airy|18.3773457007429|166.226582243424|58QFF2956632235
+Australian National|56.0384628238617|-162.332085699794|3VXC6620413592
+GRS 1967|73.8433062387819|84.4955735592175|45XVB2223396218
+WGS-84|45.3359588450991|40.0400031298722|37TEL8148720798
+Helmert 1906|59.9201815839611|-99.2827685844408|14VMM8418942625
+Bessel 1841 Nambia |-14.7469801908782|85.8375051526079|45LUD7488269470
+WGS 66|76.7872465101191|65.0798587586657|41XNF5305723979
+Clarke 1880|-77.955182771371|144.231341269374|55CDP3552145300
+WGS-84|-46.0648299617229|79.4920266271394|44GLP8337197644
+Fischer 1968|-46.0648299617229|79.4920266271394|44GLP8337097630
+Airy|-29.748187686171|-135.405807319046|8JMN6076509275
+Airy|7.02664660839798|25.1759536336006|35NKH9852877035
+GRS 1980|-23.328081037079|-157.911520393938|4KFV1128219742
+Krassovsky|11.2850029025532|160.123416303008|57PXN2261647750
+Modified Fischer 1960|63.3429435572545|-65.5753780930164|20VLR7110826412
+Hough|18.8829467124758|-72.6426446845981|18QYF4834589517
+Bessel 1841 Nambia |-33.5599610482547|149.259628455931|55HGC0974084663
+Fischer 1968|-42.9864757600699|73.2901330922691|43GCN6059939255
+GRS 1967|19.5586150524789|78.6857081619374|44QKG5719264288
+International|52.870630356142|-150.706593044311|5UPU5436760466
+WGS 66|59.0836358798848|-60.7869841003324|20VPL2681951474
+Krassovsky|50.3319354501851|50.6262418599614|39UVR7339875702
+Hough|-67.0761049801843|17.6673796933028|33DXF1591557596
+Hough|44.6070598377999|-79.0353060704053|17TPK5590741178
+WGS 66|56.9743083375776|-0.986959536978418|30VXJ2236216335
+WGS-84|54.8376254894191|-30.4398113516179|25UFA6441379726
+Everest 1830 India|7.80734863804564|-94.7379708763827|15NUJ0838563327
+WGS-84|42.1388081786232|94.1239212872368|46TEM9287865799
+Modified Fischer 1960|-50.2668337384696|137.577966166824|53FPE8371928502
+Modified Fischer 1960|-16.0823420814511|-30.9872437684145|25KGC1529720901
+Airy|-66.2328424771405|-54.6449818303734|21DXG0588052719
+Everest 1830 India|-6.84757411014701|39.7458086007605|37MEN8239243096
\ No newline at end of file

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to