@@ -95,20 +95,24 @@ TEST(operation, geogCRS_to_geogCRS_context_default) {
9595 authFactory->createCoordinateReferenceSystem("4179"), // Pulkovo 42
9696 authFactory->createCoordinateReferenceSystem("4258"), // ETRS89
9797 ctxt);
98- ASSERT_EQ(list.size(), 3U );
98+ ASSERT_EQ(list.size(), 4U );
9999 // Romania has a larger area than Poland (given our approx formula)
100- EXPECT_EQ(list[0]->getEPSGCode(), 15993); // Romania - 10m
101- EXPECT_EQ(list[1]->getEPSGCode(), 1644); // Poland - 1m
102- EXPECT_EQ(list[2]->nameStr(),
100+ EXPECT_EQ(
101+ list[0]->nameStr(),
102+ "Pulkovo 1942(58) to ETRS89-ROU [ETRF2000] (4)"); // Romania - 10m
103+ EXPECT_EQ(list[0]->getEPSGCode(), 15994); // Romania - 3m
104+ EXPECT_EQ(list[1]->getEPSGCode(), 15993); // Romania - 10m
105+ EXPECT_EQ(list[2]->getEPSGCode(), 1644); // Poland - 1m
106+ EXPECT_EQ(list[3]->nameStr(),
103107 "Ballpark geographic offset from Pulkovo 1942(58) to ETRS89");
104108
105109 EXPECT_EQ(
106110 list[0]->exportToPROJString(PROJStringFormatter::create().get()),
107111 "+proj=pipeline +step +proj=axisswap +order=2,1 +step "
108112 "+proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=push +v_3 "
109- "+step +proj=cart +ellps=krass +step +proj=helmert +x=68.1564 "
110- "+y=32.7756 +z=80.2249 +rx=2.20333014 +ry=2.19256447 "
111- "+rz=-2.54166911 +s=-0.14155333 +convention=coordinate_frame +step "
113+ "+step +proj=cart +ellps=krass +step +proj=helmert +x=2.3287 "
114+ "+y=-147.0425 +z=-92.0802 +rx=0.3092483 +ry=-0.32482185 "
115+ "+rz=-0.49729934 +s=5.68906266 +convention=coordinate_frame +step "
112116 "+inv +proj=cart +ellps=GRS80 +step +proj=pop +v_3 +step "
113117 "+proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap "
114118 "+order=2,1");
@@ -119,18 +123,21 @@ TEST(operation, geogCRS_to_geogCRS_context_default) {
119123 auto list = CoordinateOperationFactory::create()->createOperations(
120124 authFactory->createCoordinateReferenceSystem("4258"),
121125 authFactory->createCoordinateReferenceSystem("4179"), ctxt);
122- ASSERT_EQ(list.size(), 3U );
126+ ASSERT_EQ(list.size(), 4U );
123127 // Romania has a larger area than Poland (given our approx formula)
124- EXPECT_EQ(list[0]->nameStr(),
125- "Inverse of Pulkovo 1942(58) to ETRS89 (3)"); // Romania - 10m
128+ EXPECT_EQ(
129+ list[0]->nameStr(),
130+ "Inverse of Pulkovo 1942(58) to ETRS89-ROU [ETRF2000] (4)"); // Romania
131+ // -
132+ // 10m
126133
127134 EXPECT_EQ(
128135 list[0]->exportToPROJString(PROJStringFormatter::create().get()),
129136 "+proj=pipeline +step +proj=axisswap +order=2,1 +step "
130137 "+proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=push +v_3 "
131- "+step +proj=cart +ellps=GRS80 +step +inv +proj=helmert +x=68.1564 "
132- "+y=32.7756 +z=80.2249 +rx=2.20333014 +ry=2.19256447 "
133- "+rz=-2.54166911 +s=-0.14155333 +convention=coordinate_frame +step "
138+ "+step +proj=cart +ellps=GRS80 +step +inv +proj=helmert +x=2.3287 "
139+ "+y=-147.0425 +z=-92.0802 +rx=0.3092483 +ry=-0.32482185 "
140+ "+rz=-0.49729934 +s=5.68906266 +convention=coordinate_frame +step "
134141 "+inv +proj=cart +ellps=krass +step +proj=pop +v_3 +step "
135142 "+proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap "
136143 "+order=2,1");
@@ -208,8 +215,9 @@ TEST(operation, geogCRS_to_geogCRS_context_filter_bbox) {
208215 auto list = CoordinateOperationFactory::create()->createOperations(
209216 authFactory->createCoordinateReferenceSystem("4179"),
210217 authFactory->createCoordinateReferenceSystem("4258"), ctxt);
211- ASSERT_EQ(list.size(), 1U);
212- EXPECT_EQ(list[0]->getEPSGCode(), 15993); // Romania - 10m
218+ ASSERT_EQ(list.size(), 2U);
219+ EXPECT_EQ(list[0]->getEPSGCode(), 15994); // Romania - 3m
220+ EXPECT_EQ(list[1]->getEPSGCode(), 15993); // Romania - 10m
213221 }
214222 {
215223 auto ctxt = CoordinateOperationContext::create(
@@ -220,8 +228,9 @@ TEST(operation, geogCRS_to_geogCRS_context_filter_bbox) {
220228 auto list = CoordinateOperationFactory::create()->createOperations(
221229 authFactory->createCoordinateReferenceSystem("4179"),
222230 authFactory->createCoordinateReferenceSystem("4258"), ctxt);
223- ASSERT_EQ(list.size(), 1U);
224- EXPECT_EQ(list[0]->getEPSGCode(), 15993); // Romania - 10m
231+ ASSERT_EQ(list.size(), 2U);
232+ EXPECT_EQ(list[0]->getEPSGCode(), 15994); // Romania - 3m
233+ EXPECT_EQ(list[1]->getEPSGCode(), 15993); // Romania - 10m
225234 }
226235 {
227236 auto ctxt = CoordinateOperationContext::create(
@@ -1510,7 +1519,7 @@ TEST(operation, geogCRS_without_id_to_geogCRS_3D_context) {
15101519 auto list =
15111520 CoordinateOperationFactory::create()->createOperations(src, dst, ctxt);
15121521 ASSERT_GE(list.size(), 1U);
1513- auto wkt2 = "GEOGCRS[\"unnamed \",\n"
1522+ auto wkt2 = "GEOGCRS[\"Amersfoort \",\n"
15141523 " DATUM[\"Amersfoort\",\n"
15151524 " ELLIPSOID[\"Bessel 1841\",6377397.155,299.1528128,\n"
15161525 " LENGTHUNIT[\"metre\",1]]],\n"
@@ -12294,10 +12303,9 @@ TEST(operation, createOperation_ETRS89_to_Amersfoort) {
1229412303 // Amersfoort
1229512304 authFactoryEPSG->createCoordinateReferenceSystem("4289"), ctxt);
1229612305 ASSERT_GE(list.size(), 1U);
12297- // We check that we go through ETRS89-NLD [AGRS2010] to use the most
12306+ // We check that we use the most
1229812307 // precise "Amersfoort to ETRS89-NLD [AGRS2010] (9)" operation.
1229912308 EXPECT_EQ(list[0]->nameStr(),
12300- "ETRS89 to ETRS89-NLD [AGRS2010] + "
1230112309 "Inverse of Amersfoort to ETRS89-NLD [AGRS2010] (9)");
1230212310 }
1230312311 {
@@ -12307,10 +12315,9 @@ TEST(operation, createOperation_ETRS89_to_Amersfoort) {
1230712315 // ETRS89
1230812316 authFactoryEPSG->createCoordinateReferenceSystem("4258"), ctxt);
1230912317 ASSERT_GE(list.size(), 1U);
12310- // We check that we go through ETRS89-NLD [AGRS2010] to use the most
12318+ // We check that we use the most
1231112319 // precise "Amersfoort to ETRS89-NLD [AGRS2010] (9)" operation.
1231212320 EXPECT_EQ(list[0]->nameStr(),
12313- "Amersfoort to ETRS89-NLD [AGRS2010] (9) + "
12314- "Inverse of ETRS89 to ETRS89-NLD [AGRS2010]");
12321+ "Amersfoort to ETRS89-NLD [AGRS2010] (9)");
1231512322 }
1231612323}
0 commit comments