[Git][debian-gis-team/proj-rdnap][master] Improve PROJ 6 support in test script.
Bas Couwenberg
gitlab at salsa.debian.org
Mon May 6 12:57:40 BST 2019
Bas Couwenberg pushed to branch master at Debian GIS Project / proj-rdnap
Commits:
8dec62a4 by Bas Couwenberg at 2019-05-06T11:55:16Z
Improve PROJ 6 support in test script.
- - - - -
1 changed file:
- debian/patches/add-test.patch
Changes:
=====================================
debian/patches/add-test.patch
=====================================
@@ -244,7 +244,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
+]
--- /dev/null
+++ b/testrdtrans2008.pl
-@@ -0,0 +1,435 @@
+@@ -0,0 +1,447 @@
+#!/usr/bin/perl -w
+#
+# Script to do some testing of various transformations
@@ -337,17 +337,25 @@ Author: Bas Couwenberg <sebastic at debian.org>
+
+my %proj = (
+ etrs89 => {
-+ init => 'epsg:4258',
++ init => '+init=epsg:4258',
+ args => '-r',
+ format => '%.9f',
+ },
+ rdnap => {
-+ init => 'rdnap:rdnap',
++ init => '+init=rdnap:rdnap',
+ args => '-s',
+ format => '%.4f',
+ },
+ );
+
++if($proj_version{major} >= 6) {
++ $proj{etrs89}{init} = 'EPSG:4937';
++ $proj{etrs89}{args} = '';
++
++ $proj{rdnap}{init} = 'EPSG:28992+5709';
++ $proj{rdnap}{args} = '';
++}
++
+my @directions = (
+ {
+ name => 'From ETRS89 to RD/NAP',
@@ -369,14 +377,18 @@ Author: Bas Couwenberg <sebastic at debian.org>
+ foreach my $test (@{$tests}) {
+ print "Test: $test->{number} $test->{name}\n" if($cfg{verbose});
+
-+ my @cmd = (
-+ 'cs2cs',
-+ $proj{ $direction->{src} }->{args},
-+ '+init='.$proj{ $direction->{src} }->{init},
-+ '+to',
-+ '+init='.$proj{ $direction->{dst} }->{init},
-+ '-f', $proj{ $direction->{dst} }->{format},
-+ );
++ my @cmd = ('cs2cs');
++
++ if($proj{ $direction->{src} }->{args}) {
++ push @cmd, $proj{ $direction->{src} }->{args},
++ }
++
++ push @cmd, (
++ $proj{ $direction->{src} }->{init},
++ '+to',
++ $proj{ $direction->{dst} }->{init},
++ '-f', $proj{ $direction->{dst} }->{format},
++ );
+
+ my ($in, $out, $err) = '';
+
View it on GitLab: https://salsa.debian.org/debian-gis-team/proj-rdnap/commit/8dec62a42f1f11ed95eb850bb40bd119bbdcfeef
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/proj-rdnap/commit/8dec62a42f1f11ed95eb850bb40bd119bbdcfeef
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190506/1c65574a/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list