JuliaGeo / Geodesy.jl

Work with points defined in various coordinate systems.
MIT License
111 stars 24 forks source link

add support for geoids #80

Closed alex-s-gardner closed 1 year ago

alex-s-gardner commented 1 year ago

I find the Proj ellipsoid to geoid conversion really slow. The issue is that geoids are defined by spherical harmonics or large per-computed geospatial files. The fastest way to do the conversion is to sample a local copy of the data file but shipping large files with packages isn't a great idea so I've written a function geoid that returns a GeoArray of the requested geoid read from a local file. If the geoid file does not exist then it will be downloaded to a default or user specified directory and then the the user will be returned a GeoArray.

This function requires the addition of HTTP and GeoArrays packages... so that will need to be weighed

visr commented 1 year ago

Do you know why it's slow in Proj.jl? Is it because it pulls the grid data from the web rather than downloading once and using that? It might be good to create an issue on Proj.jl to discuss this as well, we might be able to improve things.

alex-s-gardner commented 1 year ago

@visr that's a good question and I don't know the answer. I will post an issue with an example on Porj.jl as well.

yeesian commented 1 year ago

Since the PR doesn't require (nor change) any code from this package, and introduces a bunch of dependencies, might you consider the option of creating a new package? Possible with usage of e.g. https://github.com/oxinabox/DataDeps.jl or https://github.com/JuliaComputing/DataSets.jl

alex-s-gardner commented 1 year ago

I'm closing this PR as it is currently a bit tangential, though it would probably be a good thing if Geodesy.jl supported Julia native geoid transformations at some point.