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.

@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