Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with EPSG:32633 to GPS/WGS84 conversion #99

Open
stephanadelsb opened this issue Jul 4, 2024 · 5 comments
Open

Problem with EPSG:32633 to GPS/WGS84 conversion #99

stephanadelsb opened this issue Jul 4, 2024 · 5 comments

Comments

@stephanadelsb
Copy link

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?

@asinghvi17
Copy link
Member

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)

@asinghvi17
Copy link
Member

If you want general transformations to and from arbitrary EPSG then look up Proj.jl.

@juliohm
Copy link
Member

juliohm commented Jul 5, 2024

@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.

@evetion
Copy link
Member

evetion commented Jul 8, 2024

@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.

@juliohm
Copy link
Member

juliohm commented Jul 8, 2024

@evetion your take on this issue is a bit surprising.

I have two things to say:

  1. 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.

  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants