aboutsummaryrefslogtreecommitdiff
path: root/test/unit/proj_angular_io_test.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-01-08 16:22:15 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-01-08 21:25:07 +0100
commitf5e5435fd5071d550e0d13f7a5d71e09c1fab2c0 (patch)
treef569d5270f7cb34adf056d04c84a23db6b4f6ed0 /test/unit/proj_angular_io_test.cpp
parentfdee4277efb45b07db2dcc4d93376cbd01cfbd0a (diff)
downloadPROJ-f5e5435fd5071d550e0d13f7a5d71e09c1fab2c0.tar.gz
PROJ-f5e5435fd5071d550e0d13f7a5d71e09c1fab2c0.zip
ISO19111: remove PROJ.5 specific format for CRS (refs #1214)
As discussed in https://github.com/OSGeo/proj.4/issues/1214#issuecomment-452084720, the introduction of a new PROJ.5 format to export CRS using pipeline/unitconvert/axisswap as an attempt of improving the PROJ.4 format used by GDAL and other products is likely a dead-end since it is still lossy in many aspects and can cause confusion with coodinate operations. Consequently the PROJ_5 convention will be identical to PROJ_4 for CRS export. Note: on the import side, I've kept the code that could parse unitconvert and axisswap when building a CRS definition from a pipeline. It is there as a hidden feature as it was kind of a tear to remove that code in case it might still be useful...
Diffstat (limited to 'test/unit/proj_angular_io_test.cpp')
-rw-r--r--test/unit/proj_angular_io_test.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/unit/proj_angular_io_test.cpp b/test/unit/proj_angular_io_test.cpp
index fdb44704..dbf09986 100644
--- a/test/unit/proj_angular_io_test.cpp
+++ b/test/unit/proj_angular_io_test.cpp
@@ -48,7 +48,9 @@ TEST(AngularUnits, Basic) {
TEST(AngularUnits, Pipelines) {
auto ctx = proj_context_create();
- auto P = proj_create(ctx, "proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=latlong +step +proj=axisswap +order=2,1");
+ auto P =
+ proj_create(ctx, "proj=pipeline +step +proj=axisswap +order=2,1 +step "
+ "+proj=latlong +step +proj=axisswap +order=2,1");
EXPECT_TRUE(proj_angular_input(P, PJ_FWD));
EXPECT_TRUE(proj_angular_output(P, PJ_FWD));
@@ -57,45 +59,43 @@ TEST(AngularUnits, Pipelines) {
proj_destroy(P);
proj_context_destroy(ctx);
-
}
TEST(AngularUnits, Pipelines2) {
auto ctx = proj_context_create();
auto P = proj_create(
- ctx,
- "+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=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=WGS84 "
- "+step +proj=axisswap +order=2,1 "
- "+step +proj=unitconvert +xy_in=m +z_in=m +xy_out=us-ft +z_out=us-ft");
+ ctx,
+ "+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=-81 +k=0.9996 +x_0=500000.001016002 "
+ "+y_0=0 +ellps=WGS84 "
+ "+step +proj=axisswap +order=2,1 "
+ "+step +proj=unitconvert +xy_in=m +z_in=m +xy_out=us-ft +z_out=us-ft");
EXPECT_FALSE(proj_angular_input(P, PJ_FWD));
EXPECT_FALSE(proj_angular_output(P, PJ_FWD));
proj_destroy(P);
proj_context_destroy(ctx);
-
}
TEST(AngularUnits, Pipelines3) {
auto ctx = proj_context_create();
auto P = proj_create(
- ctx,
- "+proj=pipeline "
- "+step +proj=axisswap +order=2,1 "
- "+step +proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=WGS84 "
- "+step +proj=axisswap +order=2,1 "
- "+step +proj=unitconvert +xy_in=m +z_in=m +xy_out=us-ft +z_out=us-ft");
+ ctx,
+ "+proj=pipeline "
+ "+step +proj=axisswap +order=2,1 "
+ "+step +proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 "
+ "+y_0=0 +ellps=WGS84 "
+ "+step +proj=axisswap +order=2,1 "
+ "+step +proj=unitconvert +xy_in=m +z_in=m +xy_out=us-ft +z_out=us-ft");
EXPECT_TRUE(proj_angular_input(P, PJ_FWD));
EXPECT_FALSE(proj_angular_output(P, PJ_FWD));
proj_destroy(P);
proj_context_destroy(ctx);
-
}
-
} // namespace