From f457768d128fbf7a41ef81679f6c897a5639c278 Mon Sep 17 00:00:00 2001 From: Anshul Singhvi Date: Mon, 7 Oct 2024 22:48:06 -0700 Subject: [PATCH] test --- test/libproj.jl | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/test/libproj.jl b/test/libproj.jl index 04a0f5c..7b5424c 100644 --- a/test/libproj.jl +++ b/test/libproj.jl @@ -203,19 +203,29 @@ end source_crs = GFT.EPSG("EPSG:4326") target_crs = GFT.EPSG("EPSG:32628") - trans = Proj.Transformation(source_crs, target_crs, always_xy = false) + trans = Proj.Transformation(source_crs, target_crs, always_xy = true) info = Proj.proj_pj_info(trans.pj) description1 = unsafe_string(info.definition) + # crs as WellKnownText{CRS} + # verbose to work around the lack of a GFT blessed implementation in Proj + source_crs = GFT.WellKnownText(GFT.CRS(), GFT.val(GFT.ESRIWellKnownText(Proj.CRS("EPSG:4326")))) + target_crs = GFT.WellKnownText(GFT.CRS(), GFT.val(GFT.ESRIWellKnownText(Proj.CRS("EPSG:32628")))) + + trans = Proj.Transformation(source_crs, target_crs, always_xy = true) + info = Proj.proj_pj_info(trans.pj) + description2 = unsafe_string(info.definition) + #crs as txt source_crs = "EPSG:4326" target_crs = "EPSG:32628" - trans = Proj.Transformation(source_crs, target_crs, always_xy = false) + trans = Proj.Transformation(source_crs, target_crs, always_xy = true) info = Proj.proj_pj_info(trans.pj) - description2 = unsafe_string(info.definition) + description_true = unsafe_string(info.definition) - @test description1 == description2 + @test description1 == description_true + @test description2 == description_true end @testset "bounds" begin