-
Notifications
You must be signed in to change notification settings - Fork 4
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
Spherical geometry #17
Comments
Turf.jl also has a bunch of code for this we could use. |
Distance between points and lines on a sphere would also be useful |
Could be good to standardise with Distances.jl This also integrates with for fast calculations of e.g. distances between vectors of points, Like finding minimum spherical distances between raster pixels and points in an arbitrary collection of features/geometries is only this much code already: points = GeometryOps.flatten(GI.PointTrait, rivers) do point
SVector(deg2rad(GI.x(point)), deg2rad(GI.y(point)))
end |> collect
bt = BallTree(points, SphericalAngle())
targets = map(DimPoints(mask_raster)) do p
SVector(deg2rad.(p))
end |> vec
nearest = nn(bt, targets)
dist = Raster(nearest[2], dims(mask_raster))
Rasters.rplot(dist) But it could be nice to make this a bit easier for people, and have a Distances to lines and polygons on a sphere will of course be harder than this, but it would be good to have those too. |
Just to chime in, there seem to be two other packages which look at spherical (specifically Earth spherical :D) coordinates: GeographicLib.jl (unregistered but pure Julia) or Proj.jl's geodesic API. I would guess that we could offer one or all of those as references as well, at least in the docs! |
Hello. While doing this -- how about Hyperbolic Geometry [has applications in AI/ML]. |
It could be useful to have some spherical geometry (read: geometry on the Earth surface).
In this pull request I implemented a formula to calculate the area of any spherical polygon, which of course sits awkwardly in Rasters.jl.
Some things we might want to implement are (please suggest more):
This page has some relevant math
The text was updated successfully, but these errors were encountered: