-
Notifications
You must be signed in to change notification settings - Fork 0
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
Unifying GeometryOps and SphericalGeodesics' approaches #2
Comments
We've also found, in rafaqz/Rasters.jl#746 and the PR rafaqz/Rasters.jl#768 (computing the area of each pixel of an image in spherical space), |
Thank you, that's good to know. |
I see, so you have implemented Karney's stuff as well? Or is that taken from GeographicLib.jl? Sounds good if it has been battle-tested! I thought that GeographicLib.jl was largely unused and didn't know how well-tested it was, but a number of people have asked me to register it, hence this repo.
In principle if GeometryOpsCore wants to hold all the types and methods for Haversine, Vincenty and 'GeographicLib' (Karney), then I would be happy for them to rest there. However, I think for users like me, needing to know about geometries and such like can be quite a lot of friction. I and many of my colleagues are often not so familiar with the terminology in GeometryOps (what is a geometry?) and there seems to be a need in my community at least for something which just takes in geographic coordinates and gives them back. Likewise, I see that GeometryOpsCore depends on DataAPI, Tables and GeoInterface, three things I don't know much about and would be reluctant to bring in without good reason. Would depending on this package be too onerous if it didn't have any dependencies at all (which is currently the way it is)? |
I haven't implemented Karney's equations - currently everything goes to GeographicLib, which works well enough for what I need to do. A bit of context on the Julia/GIS world from my perspective:
TLDR: depending on how large of a package SphericalGeodesics.jl ends up being, it may or may not make sense to have it as a dependency of GeometryOpsCore. We could potentially split out a package from SphericalGeodesics that GeometryOpsCore can depend on though, that just has these definitions of "manifold" structs (we need planes, spheres and ellipses in GeometryOps). |
DataAPI and Tables are basically also thin wrapper packages that define accessors for tables and metadata, as well as common function names so you don't get errors when |
For GeometryOps, I need three things fundamentally:
It looks like SphericalGeodesics.jl is looking to do 1 and 3 at least, so we should probably at least use the same types to minimize complications. I recently released a GeometryOpsCore.jl that has
Spherical
andGeodesic
(maybe this should beEllipsoid
) types, happy to also use the definition from here. Only thing is that GeometryOpsCore ideally has minimal dependencies, so it would be great to have SphericalGeodesics depend on it rather than the other way around. Beyond some renaming of the ellipsoid/geodesic type it's currently very stable and battle-tested.The approach I want to take in GeometryOps is:
to indicate that the geometry should be known to be spherical. Ideally, this also checks CRS etc and automatically reprojects, but that's a project for later. We already have spherical Delaunay triangulation and Voronoi polygons in a PR on DelaunayTriangulation, for example, so you could have
triangulate(Planar(), geom)
that does standard Delaunay triangulation andtriangulate(Spherical(), geom)
ortriangulate(Quickhull(Spherical()), geom)
that does the spherical triangulation.The main places I would use SphericalGeodesics are in
distance
orsegmentize
/interpolate(some_line_like_thing, arclength; normalize = false)
.What do you think?
The text was updated successfully, but these errors were encountered: