diff --git a/Project.toml b/Project.toml index 8de1494..b30dea1 100644 --- a/Project.toml +++ b/Project.toml @@ -13,7 +13,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [compat] -CoordRefSystems = "0.16.2" +CoordRefSystems = "0.16.3" DataDeps = "0.7" GeoTIFF = "0.4" Interpolations = "0.15" diff --git a/src/grids.jl b/src/grids.jl index ec9a538..b702727 100644 --- a/src/grids.jl +++ b/src/grids.jl @@ -154,6 +154,8 @@ geotiff(::Type{NTF}, ::Type{RGF93v2b}) = "fr_ign_gr3df97a.tif" geotiff(::Type{OSGB36}, ::Type{<:ETRF}) = "uk_os_OSTN15_NTv2_OSGBtoETRS.tif" +geotiff(::Type{PD83}, ::Type{<:ETRF}) = "de_tlbg_thueringen_NTv2gridTH.tif" + # TODO: unsupported GeoTIFF format: StridedTaggedImage # geotiff(::Type{RD83}, ::Type{<:ETRF}) = "de_geosn_NTv2_SN.tif" diff --git a/src/transforms.jl b/src/transforms.jl index ca67d3b..c69e2e4 100644 --- a/src/transforms.jl +++ b/src/transforms.jl @@ -49,6 +49,9 @@ include("transforms/geocgridtranslation.jl") # https://epsg.org/transformation_7709/OSGB36-to-ETRS89-2.html @hgridshift OSGB36 ETRF +# https://epsg.org/transformation_10677/PD-83-to-ETRS89-2.html +@hgridshift PD83 ETRF + # https://epsg.org/transformation_5529/SAD69-96-to-SIRGAS-2000-1.html @hgridshift SAD96 SIRGAS2000 diff --git a/test/converions.jl b/test/converions.jl index 40e23b2..d78123c 100644 --- a/test/converions.jl +++ b/test/converions.jl @@ -93,6 +93,15 @@ c2 = convert(LatLon{ETRFLatest}, c1) @test allapprox(c2, LatLon{ETRFLatest}(T(55.50001349305527), T(-2.0015656316280364))) + # PD/83 to ETRF (ETRS89) + c1 = LatLon{PD83}(T(50.94), T(11.25)) + c2 = convert(LatLon{ETRFLatest}, c1) + @test allapprox(c2, LatLon{ETRFLatest}(T(50.93875928335719), T(11.248613153855006))) + + c1 = LatLon{PD83}(T(51.14), T(11.45)) + c2 = convert(LatLon{ETRFLatest}, c1) + @test allapprox(c2, LatLon{ETRFLatest}(T(51.138737511105006), T(11.448580215003755))) + # SAD96 to SIRGAS2000 c1 = LatLon{SAD96}(T(-15), T(-45)) c2 = convert(LatLon{SIRGAS2000}, c1)