Skip to content

Commit

Permalink
Add PD/83 to ETRS89 (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliascarv authored Dec 11, 2024
1 parent a5dd2fd commit 79fcdb8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions src/grids.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 3 additions & 0 deletions src/transforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 9 additions & 0 deletions test/converions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 79fcdb8

Please sign in to comment.