Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 committed Oct 8, 2024
1 parent 49e4df1 commit f457768
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions test/libproj.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f457768

Please sign in to comment.