Converting Longitude & Latitude to X Y on a map using Julia

,

Well, I went ahead and did this β€” let me know if it seems useful.

https://github.com/JuliaGeo/Geodesy.jl/pull/67

@Wedg somehow I missed your comment about the implementation in PlotShapefiles.jl, but oh well :slight_smile:

One nice (at least, IMO) thing the Geodesy.jl API provides is CoordinateTransformations.jl β€” based transformation objects so you can naturally create a whole pipeline of coordinate transformations.

TBH it feels a little dirty to provide this somewhat-broken projection in a package called β€œGeodesy”, but it’s undeniably needed as it’s ubiquitous in practice… Even the EPSG eventually had to give up and assign it an official code :laughing:

7 Likes

Hi @joa-quim, is there a way in Julia to convert from geographic coordinates (xΒΊ x’’ x’) to decimal coordinates to use in GMT?
Thanks.
JoΓ£o Rocha

Are you asking on how to do it from data in a file?
It’s automatic

println(String(read("lixo.dat")))
-10:19:58.800   40:46:37.200


gmtread("lixo.dat")
1Γ—2 GMTdataset{Float64, 2}
 Row β”‚   col.1    col.2
     β”‚ Float64  Float64
─────┼──────────────────
   1 β”‚ -10.333   40.777
1 Like