diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | test/cli/testprojinfo_out.dist | 3 | ||||
| -rw-r--r-- | test/gigs/5104.gie (renamed from test/gigs/5104.gie.failing) | 18 | ||||
| -rw-r--r-- | test/gigs/Makefile.am | 6 | ||||
| -rw-r--r-- | test/unit/test_io.cpp | 22 |
5 files changed, 40 insertions, 11 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c60f344b..014ce010 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -32,7 +32,7 @@ proj_add_gie_test("GIGS-5102.1" "gigs/5102.1.gie") proj_add_gie_test("GIGS-5103.1" "gigs/5103.1.gie") proj_add_gie_test("GIGS-5103.2" "gigs/5103.2.gie") proj_add_gie_test("GIGS-5103.3" "gigs/5103.3.gie") -#proj_add_gie_test("GIGS-5104" "gigs/5104.gie") +proj_add_gie_test("GIGS-5104" "gigs/5104.gie") #proj_add_gie_test("GIGS-5105.1" "gigs/5105.1.gie") proj_add_gie_test("GIGS-5105.2" "gigs/5105.2.gie") proj_add_gie_test("GIGS-5106" "gigs/5106.gie") diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index 42000716..14856a68 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -1018,7 +1018,8 @@ PROJCRS["WGS 84 / UTM zone 31N", AXIS["ellipsoidal height (h)",up, ORDER[3], LENGTHUNIT["metre",1, - ID["EPSG",9001]]]] + ID["EPSG",9001]]], + REMARK["Promoted to 3D from EPSG:32631"]] Testing -s EPSG:32631 -t EPSG:4326+3855 --summary Candidate operations found: 3 diff --git a/test/gigs/5104.gie.failing b/test/gigs/5104.gie index 10c42935..b2a4241d 100644 --- a/test/gigs/5104.gie.failing +++ b/test/gigs/5104.gie @@ -4,11 +4,13 @@ Test 5104, Oblique stereographic, v2-0_2011-06-28. -------------------------------------------------------------------------------- -<gie> +<gie-strict> + +use_proj4_init_rules true -------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4289 +inv +operation +proj=pipeline \ + +step +init=epsg:4289 +inv \ +step +init=epsg:28992 -------------------------------------------------------------------------------- tolerance 0.05 m @@ -92,8 +94,8 @@ accept 11 53 expect 531469.2 571538.84 -------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:28992 +inv +operation +proj=pipeline \ + +step +init=epsg:28992 +inv \ +step +init=epsg:4289 -------------------------------------------------------------------------------- tolerance 0.05 m @@ -177,8 +179,8 @@ accept 531469.2 571538.84 expect 11 53 -------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4289 +inv +operation +proj=pipeline \ + +step +init=epsg:4289 +inv \ +step +init=epsg:28992 -------------------------------------------------------------------------------- tolerance 0.006 m @@ -261,4 +263,4 @@ tolerance 0.006 m accept 11 53 roundtrip 1000 -</gie> +</gie-strict> diff --git a/test/gigs/Makefile.am b/test/gigs/Makefile.am index 436a6e89..2bdff3f2 100644 --- a/test/gigs/Makefile.am +++ b/test/gigs/Makefile.am @@ -10,6 +10,7 @@ EXTRA_DIST = \ 5103.1.gie \ 5103.2.gie \ 5103.3.gie \ + 5104.gie \ 5105.2.gie \ 5106.gie \ 5107.gie \ @@ -46,6 +47,9 @@ PROJ_LIB ?= ../../data/for_tests 5103.3: 5103.3.gie PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< +5104: 5104.gie + PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< + 5105.2: 5105.2.gie PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< @@ -73,4 +77,4 @@ PROJ_LIB ?= ../../data/for_tests 5208: 5208.gie PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< -check-local: 5101.1 5101.2 5101.3 5101.4 5102.1 5103.1 5103.2 5103.3 5105.2 5106 5107 5109 5111.1 5112 5113 5201 5208 +check-local: 5101.1 5101.2 5101.3 5101.4 5102.1 5103.1 5103.2 5103.3 5104 5105.2 5106 5107 5109 5111.1 5112 5113 5201 5208 diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp index 34396fcf..47e574c5 100644 --- a/test/unit/test_io.cpp +++ b/test/unit/test_io.cpp @@ -190,6 +190,28 @@ TEST(wkt_parse, datum_with_ANCHOR) { // --------------------------------------------------------------------------- +TEST(wkt_parse, datum_with_pm) { + const char *wkt = + "DATUM[\"Nouvelle Triangulation Francaise (Paris)\",\n" + " ELLIPSOID[\"Clarke 1880 (IGN)\",6378249.2,293.466021293627,\n" + " LENGTHUNIT[\"metre\",1]],\n" + " ID[\"EPSG\",6807]],\n" + "PRIMEM[\"Paris\",2.5969213,\n" + " ANGLEUNIT[\"grad\",0.0157079632679489],\n" + " ID[\"EPSG\",8903]]"; + + auto obj = WKTParser().createFromWKT(wkt); + auto datum = nn_dynamic_pointer_cast<GeodeticReferenceFrame>(obj); + ASSERT_TRUE(datum != nullptr); + EXPECT_EQ(datum->primeMeridian()->nameStr(), "Paris"); + EXPECT_EQ( + datum->exportToWKT( + WKTFormatter::create(WKTFormatter::Convention::WKT2_2019).get()), + wkt); +} + +// --------------------------------------------------------------------------- + TEST(wkt_parse, datum_no_pm_not_earth) { auto obj = WKTParser().createFromWKT("DATUM[\"unnamed\",\n" " ELLIPSOID[\"unnamed\",1,0,\n" |
