Problem with EPSG:32633 to GPS/WGS84 conversion
Can I do the conversion from EPSG:32633 to EPSG:4326 [GPS/WGS84] with Geodesy.jl? I read the documentation and I'm still puzzled on how to do this.
Here is the code using PyCall to pyproj transformations:
using PyCall
py"""
import pyproj
print(pyproj.Transformer.from_crs("EPSG:32633", "EPSG:4326").transform(599445.75,5347365.45))
print(pyproj.Transformer.from_crs("EPSG:4326", "EPSG:32633").transform(48.27168293014, 16.34019877249))
# 1st result: (48.27168293014006, 16.340198772490897)
# 2nd result: (599445.7499999339, 5347365.449999993)
"""
Can I do this with Geodesy?
The definition of your EPSG is UTM zone 33N, so you can adapt the line from the README:
points_lla::Vector{LLA{Float64}}
utm_from_lla = UTMfromLLA(33, true, wgs84) # Zone 33N
points_utm = map(utm_from_lla, points_lla)
If you want general transformations to and from arbitrary EPSG then look up Proj.jl.
@stephanadelsb if you want to benefit from a native Julia implementation, take a look into CoordRefSystems.jl. It has your conversion covered, and should be ~75x faster than the Proj.jl wrapper (which is equivalent to the pyproj wrapper):
julia> using CoordRefSystems
julia> CRS1 = CoordRefSystems.get(EPSG{4326})
GeodeticLatLon{WGS84Latest}
julia> CRS2 = CoordRefSystems.get(EPSG{32633})
UTMNorth{33, WGS84Latest} (alias for UTM{North, 33, WGS84{1762}})
julia> convert(CRS2, CRS1(48.27168293014, 16.34019877249))
UTMNorth{WGS84Latest} coordinates
├─ x: 599445.7499999327 m
└─ y: 5.347365449999993e6 m
julia> convert(CRS1, CRS2(599445.75, 5347365.45))
GeodeticLatLon{WGS84Latest} coordinates
├─ lat: 48.27168293014006°
└─ lon: 16.34019877249091°
Geodesy.jl is not actively maintained. It should be deprecated or archived to avoid similar experiences.
@juliohm FWIW, @asinghvi17 his answer was done with the native Julia implementation in this Geodesy package. Avoiding "similar experiences" and plugging CoordRefSystem is uncalled-for, and it would be appreciated if you disclose you're the author of said package.
Proj was mentioned for operations on other non-generic crs, that are not supported in Geodesy (nor in CoordRefSystems.jl for that matter).
A discussion on the maintenance status of this package should be done in a separate issue.
@evetion your take on this issue is a bit surprising.
I have two things to say:
-
Geodesy.jl should not be recommended to anyone nowadays given its status and available alternatives. You are not helping the OP by omitting this information.
-
It doesn't matter that we maintain CoordRefSystems.jl, this is not politics. My recommendations are always based on technical criteria, and Geodesy.jl is clearly not the recommended option.