Anshul Singhvi

Results 1165 comments of Anshul Singhvi

Happy to report that this solves #764 in web mercator as well! ![hello](https://github.com/user-attachments/assets/57dd42f0-e955-45a6-9d02-241aff2ea747)

Full changelog: - Switch `cellarea` and `reproject` to use Proj instead of ArchGDAL, increasing speed and decreasing the number of allocations. - Cellarea changes: - Rename `cellsize` to `cellarea` -...

@alex-s-gardner can you confirm this is on v0.11.8 of Rasters.jl?

~I wonder if we need to densify and subsample points on the grid? I would expect that to have an effect as we increase dx and dy though, not as...

No, but it is being converted to radians and then multiplied by pi

> specialised implementation for lon-lat grids that calculates the size of each latitudinal band in a grid and then divides it up between the cells Could that also apply to...

I just came across https://github.com/google/s2geometry/issues/190, it seems pretty insightful - maybe we should use one of the approaches there, or convert early to completely spherical (x, y, z) Cartesian points?

With the PR, this works correctly for lat/long. But if I resample the last example raster to web mercator, I get this: ![hello](https://github.com/user-attachments/assets/248401ee-f1e2-41b6-889c-6fd5d9a8426d)

> I implemented Eriksson's formula like this. It has all these dot products and cross products so I think it's going to allocate no matter what. I usually use static...

Here's a super basic implementation that should get you what you need: ```julia using LinearAlgebra struct SphericalPoint{T