After taking a look at packages like ArchGDAL I have still no idea how to project coordinates from an arbitrary Lambert Conformal Conic projection, defined by standard_parallel, latitude_of_projection_origin and longitude_of_central_meridian, to geographical latitude / longitude coordinates.
Unfortunately, there is no EPSG number available.
Is there a “function” like (lat,lon) = Lambert_Conformal_Conical_to_Lat_Lon(standard_parallel,latitude_of_projection_origin,longitude_of_central_meridian)?
If not, I would have to implement some equations like that Link to equations
I have also seen this post but is GMT not only usable for ploting maps instead of converting points from one projection into another? But I will take a closer look at this post.
Off course GMT does it. Both xy2lonlat and mapproject will do the job but the latter has a more complicated manual (it does a lot more than coordinate conversions) that was not yet converted do .md (big job).
Just find the proj4 string that defines Lambert data and follow the instructions of xy2lonlat
help?> xy2lonlat
search: xy2lonlat
xy2lonlat(xy::Matrix{<:Real}, s_srs::String; t_srs=::String="+proj=longlat +datum=WGS84")
or
xy2lonlat(D::GMTdataset, s_srs::String; t_srs=::String="+proj=longlat +datum=WGS84")
Computes the inverse projection from XY to LonLat in the given projection. The output is assumed to be in WGS84. If that isn't right, pass the
appropriate projection info via the t_srs option.
Parameters
––––––––––––
• xy: The input data. It can be a Matrix, or a GMTdataset (or vector of it)
• s_srs: The data projection system. This can be a PROJ4 or a WKT string
• t_srs: The target SRS. If the default is not satisfactory, provide a new projection info (PROJ4 or WKT)
Returns
–––––––––
A Matrix if input is a Matrix or a GMTdadaset if input had that type
Here is an example using Proj4.jl directly. Like GMT and ArchGDAL, which use PROJ as well, you can create the proj or WKT string yourself, see also the documentation here: Lambert Conformal Conic — PROJ 9.1.0 documentation.
using Proj4
lcc = "+proj=lcc +lon_0=-90 +lat_1=33 +lat_2=45"
trans = Proj4.Transformation(lcc, "EPSG:4326", always_xy=true)
julia> trans((0.0, 0.0))
2-element StaticArrays.SVector{2, Float64} with indices SOneTo(2):
-90.0
1.2722218725854067e-14