aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-10-23 19:03:23 +0200
committerGitHub <noreply@github.com>2020-10-23 19:03:23 +0200
commit2dabb14ec8b33c57b87b1c2c4c7112e385824d12 (patch)
treecd8d3b6c7f3447a4febd521a3e78f460be18eb16 /test
parent30e0b09275d6803539a80762e90b6e7ca2751c26 (diff)
parente30be68ce18c9f41cf7b47bef0931441bab75c97 (diff)
downloadPROJ-2dabb14ec8b33c57b87b1c2c4c7112e385824d12.tar.gz
PROJ-2dabb14ec8b33c57b87b1c2c4c7112e385824d12.zip
Merge pull request #2392 from rouault/fi_nls_tins
Database (and tweaks in core): Add Finland tinshift operations
Diffstat (limited to 'test')
-rwxr-xr-xtest/cli/testprojinfo35
-rw-r--r--test/cli/testprojinfo_out.dist61
-rw-r--r--test/unit/test_factory.cpp14
3 files changed, 103 insertions, 7 deletions
diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo
index 043e5724..62713af5 100755
--- a/test/cli/testprojinfo
+++ b/test/cli/testprojinfo
@@ -236,6 +236,41 @@ echo 'Testing -s NZGD2000 -t ITRF2014 -o PROJ -q' >> ${OUT}
$EXE -s NZGD2000 -t ITRF2014 -o PROJ -q >>${OUT} 2>&1
echo "" >>${OUT}
+######################
+# Finland TINs
+######################
+
+echo 'Testing -s "KKJ / Finland Uniform Coordinate System" -t "ETRS89 / TM35FIN(E,N)" --grid-check none -o PROJ -q' >> ${OUT}
+$EXE -s "KKJ / Finland Uniform Coordinate System" -t "ETRS89 / TM35FIN(E,N)" --grid-check none -o PROJ -q >>${OUT} 2>&1
+echo "" >>${OUT}
+
+echo 'Testing -s KKJ -t ETRS89 -o PROJ --grid-check none -q' >> ${OUT}
+$EXE -s KKJ -t ETRS89 -o PROJ --grid-check none -q >>${OUT} 2>&1
+echo "" >>${OUT}
+
+echo 'Testing -s "KKJ + N43 height" -t "KKJ + N60 height" --grid-check none -o PROJ -q' >> ${OUT}
+$EXE -s "KKJ + N43 height" -t "KKJ + N60 height" --grid-check none -o PROJ -q >>${OUT} 2>&1
+echo "" >>${OUT}
+
+echo 'Testing -s "KKJ + N60 height" -t "KKJ + N2000 height" --grid-check none -o PROJ -q' >> ${OUT}
+$EXE -s "KKJ + N60 height" -t "KKJ + N2000 height" --grid-check none -o PROJ -q >>${OUT} 2>&1
+echo "" >>${OUT}
+
+# Advanced !
+echo 'Testing -s "KKJ + N43 height" -t "ETRS89 + N2000 height" --grid-check none -o PROJ -q' >> ${OUT}
+$EXE -s "KKJ + N43 height" -t "ETRS89 + N2000 height" --grid-check none -o PROJ -q >>${OUT} 2>&1
+echo "" >>${OUT}
+
+# Advanced !
+echo 'Testing -s "KKJ / Finland Uniform Coordinate System + N43 height" -t "ETRS89 / TM35FIN(E,N) + N2000 height" --grid-check none -o PROJ -q' >> ${OUT}
+$EXE -s "KKJ / Finland Uniform Coordinate System + N43 height" -t "ETRS89 / TM35FIN(E,N) + N2000 height" --grid-check none -o PROJ -q >>${OUT} 2>&1
+echo "" >>${OUT}
+
+# Advanced !
+echo 'Testing -s "ETRS89 / TM35FIN(E,N) + N2000 height" -t "KKJ / Finland Uniform Coordinate System + N43 height" --grid-check none -o PROJ -q' >> ${OUT}
+$EXE -s "ETRS89 / TM35FIN(E,N) + N2000 height" -t "KKJ / Finland Uniform Coordinate System + N43 height" --grid-check none -o PROJ -q >>${OUT} 2>&1
+echo "" >>${OUT}
+
# do 'diff' with distribution results
echo "diff ${OUT} with testprojinfo_out.dist"
diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist
index 3025295b..245bb258 100644
--- a/test/cli/testprojinfo_out.dist
+++ b/test/cli/testprojinfo_out.dist
@@ -1283,3 +1283,64 @@ Testing -s NZGD2000 -t ITRF2014 -o PROJ -q
+step +proj=unitconvert +xy_in=rad +xy_out=deg
+step +proj=axisswap +order=2,1
+Testing -s "KKJ / Finland Uniform Coordinate System" -t "ETRS89 / TM35FIN(E,N)" --grid-check none -o PROJ -q
++proj=pipeline
+ +step +proj=axisswap +order=2,1
+ +step +proj=tinshift +file=fi_nls_ykj_etrs35fin.json
+
+Testing -s KKJ -t ETRS89 -o PROJ --grid-check none -q
++proj=pipeline
+ +step +proj=axisswap +order=2,1
+ +step +proj=unitconvert +xy_in=deg +xy_out=rad
+ +step +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=3500000 +y_0=0 +ellps=intl
+ +step +proj=tinshift +file=fi_nls_ykj_etrs35fin.json
+ +step +inv +proj=utm +zone=35 +ellps=GRS80
+ +step +proj=unitconvert +xy_in=rad +xy_out=deg
+ +step +proj=axisswap +order=2,1
+
+Testing -s "KKJ + N43 height" -t "KKJ + N60 height" --grid-check none -o PROJ -q
++proj=pipeline
+ +step +proj=axisswap +order=2,1
+ +step +proj=unitconvert +xy_in=deg +xy_out=rad
+ +step +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=3500000 +y_0=0 +ellps=intl
+ +step +proj=tinshift +file=fi_nls_n43_n60.json
+ +step +inv +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=3500000 +y_0=0 +ellps=intl
+ +step +proj=unitconvert +xy_in=rad +xy_out=deg
+ +step +proj=axisswap +order=2,1
+
+Testing -s "KKJ + N60 height" -t "KKJ + N2000 height" --grid-check none -o PROJ -q
++proj=pipeline
+ +step +proj=axisswap +order=2,1
+ +step +proj=unitconvert +xy_in=deg +xy_out=rad
+ +step +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=3500000 +y_0=0 +ellps=intl
+ +step +proj=tinshift +file=fi_nls_n60_n2000.json
+ +step +inv +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=3500000 +y_0=0 +ellps=intl
+ +step +proj=unitconvert +xy_in=rad +xy_out=deg
+ +step +proj=axisswap +order=2,1
+
+Testing -s "KKJ + N43 height" -t "ETRS89 + N2000 height" --grid-check none -o PROJ -q
++proj=pipeline
+ +step +proj=axisswap +order=2,1
+ +step +proj=unitconvert +xy_in=deg +xy_out=rad
+ +step +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=3500000 +y_0=0 +ellps=intl
+ +step +proj=tinshift +file=fi_nls_n43_n60.json
+ +step +proj=tinshift +file=fi_nls_n60_n2000.json
+ +step +proj=tinshift +file=fi_nls_ykj_etrs35fin.json
+ +step +inv +proj=utm +zone=35 +ellps=GRS80
+ +step +proj=unitconvert +xy_in=rad +xy_out=deg
+ +step +proj=axisswap +order=2,1
+
+Testing -s "KKJ / Finland Uniform Coordinate System + N43 height" -t "ETRS89 / TM35FIN(E,N) + N2000 height" --grid-check none -o PROJ -q
++proj=pipeline
+ +step +proj=axisswap +order=2,1
+ +step +proj=tinshift +file=fi_nls_n43_n60.json
+ +step +proj=tinshift +file=fi_nls_n60_n2000.json
+ +step +proj=tinshift +file=fi_nls_ykj_etrs35fin.json
+
+Testing -s "ETRS89 / TM35FIN(E,N) + N2000 height" -t "KKJ / Finland Uniform Coordinate System + N43 height" --grid-check none -o PROJ -q
++proj=pipeline
+ +step +inv +proj=tinshift +file=fi_nls_ykj_etrs35fin.json
+ +step +inv +proj=tinshift +file=fi_nls_n60_n2000.json
+ +step +inv +proj=tinshift +file=fi_nls_n43_n60.json
+ +step +proj=axisswap +order=2,1
+
diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp
index 2a9d2bd2..1005d49b 100644
--- a/test/unit/test_factory.cpp
+++ b/test/unit/test_factory.cpp
@@ -1728,7 +1728,7 @@ class FactoryWithTmpDatabase : public ::testing::Test {
"offset',-17.4,'EPSG','9110',NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
- "NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
+ "NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
<< last_error();
ASSERT_TRUE(
execute("INSERT INTO usage VALUES('EPSG',"
@@ -2334,7 +2334,7 @@ TEST_F(FactoryWithTmpDatabase, AuthorityFactory_proj_based_transformation) {
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
- "NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
+ "NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
<< last_error();
ASSERT_TRUE(execute("INSERT INTO usage VALUES('OTHER',"
"'other_transformation_FOO_usage',"
@@ -2401,7 +2401,7 @@ TEST_F(FactoryWithTmpDatabase, AuthorityFactory_wkt_based_transformation) {
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
- "NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
+ "NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
<< last_error();
ASSERT_TRUE(execute("INSERT INTO usage VALUES('OTHER',"
"'other_transformation_FOO_usage',"
@@ -2442,7 +2442,7 @@ TEST_F(FactoryWithTmpDatabase,
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
- "NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
+ "NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
<< last_error();
ASSERT_TRUE(execute("INSERT INTO usage VALUES('OTHER',"
"'other_transformation_FOO_usage',"
@@ -2476,7 +2476,7 @@ TEST_F(FactoryWithTmpDatabase,
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
- "NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
+ "NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
<< last_error();
ASSERT_TRUE(execute("INSERT INTO usage VALUES('OTHER',"
"'other_transformation_FOO_usage',"
@@ -2976,7 +2976,7 @@ TEST_F(FactoryWithTmpDatabase,
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
- "NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
+ "NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
<< last_error();
ASSERT_TRUE(execute("INSERT INTO usage VALUES('OTHER', "
"'1','other_transformation','OTHER','PARTIAL_AREA_"
@@ -2992,7 +2992,7 @@ TEST_F(FactoryWithTmpDatabase,
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
"NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,"
- "NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
+ "NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);"))
<< last_error();
ASSERT_TRUE(execute("INSERT INTO usage VALUES('OTHER', "
"'2','other_transformation','OTHER','WHOLE_AREA_APPROX_"