Skip to content
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

[WIP] switch cellarea and reproject to use Proj #2

Merged
merged 7 commits into from
Oct 8, 2024

Conversation

asinghvi17
Copy link

@asinghvi17 asinghvi17 commented Oct 8, 2024

What it says on the tin. Currently, reproject has an 8x speedup or so, and a lot less allocations too.

Needs some changes from JuliaGeo/Proj.jl#111

This commit creates a new `reproject` method that uses Proj to transform an array of values in place using `proj_trans_generic`, only allocating a Float64 output array.  It also performs the reproject check before actually transforming the array.

This decreases runtime on my machine from 4.168 ms (ArchGDAL) to 665.187 μs (Proj), and allocations from 35167 allocs: 1.254 MiB (ArchGDAL) to 108 allocs: 42.859 KiB (Proj).
This is a weakness of this method compared to the old ArchGDAL method.  Does this need a fix in Proj?
@asinghvi17
Copy link
Author

@rafaqz @tiemvanderdeure this passes CI on my local machine, hopefully it passes up here too, but if not it probably needs the Proj PR I linked (at least) + maybe one more to auto-add +type=crs to proj-strings in the Proj.CRS constructor.

@asinghvi17
Copy link
Author

I have no clue why CI is failing, something in write it looks like...

@tiemvanderdeure
Copy link
Owner

it's super weird but for sure not related to this PR. Must be some package released a new version that broke this? I'll just merge this and we can figure the tests out later.

@tiemvanderdeure tiemvanderdeure merged commit c890a83 into tiemvanderdeure:better_cellsize Oct 8, 2024
0 of 2 checks passed
@asinghvi17 asinghvi17 deleted the as/proj branch October 8, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants