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

add a function to calculate cell size #508

Merged
merged 4 commits into from
Sep 1, 2023
Merged

Conversation

tiemvanderdeure
Copy link
Contributor

@tiemvanderdeure tiemvanderdeure commented Aug 31, 2023

Closes #415

Copy link
Owner

@rafaqz rafaqz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!! So excited to have this method in Rasters, thanks for writing it up.

I made a few comments on style and naming, and some doc string changes (that you can just merge in in the interface if you want them)

The tests are failing because we forgot to pass through the function name in the extensions error method - we should pass in e.g. cellarea as f and use it in the MethodError

ext/RastersArchGDALExt/cellsize.jl Outdated Show resolved Hide resolved
ext/RastersArchGDALExt/cellsize.jl Outdated Show resolved Hide resolved
ext/RastersArchGDALExt/cellsize.jl Outdated Show resolved Hide resolved
ext/RastersArchGDALExt/cellsize.jl Outdated Show resolved Hide resolved
ext/RastersArchGDALExt/cellsize.jl Outdated Show resolved Hide resolved
src/extensions.jl Outdated Show resolved Hide resolved
@tiemvanderdeure
Copy link
Contributor Author

Thanks for your comments! The MethodError should work now.

@codecov-commenter
Copy link

Codecov Report

Merging #508 (0f41810) into main (bde22ed) will decrease coverage by 0.83%.
Report is 1 commits behind head on main.
The diff coverage is 12.50%.

@@            Coverage Diff             @@
##             main     #508      +/-   ##
==========================================
- Coverage   81.25%   80.43%   -0.83%     
==========================================
  Files          49       50       +1     
  Lines        4135     4170      +35     
==========================================
- Hits         3360     3354       -6     
- Misses        775      816      +41     
Files Changed Coverage Δ
ext/RastersArchGDALExt/RastersArchGDALExt.jl 100.00% <ø> (ø)
ext/RastersArchGDALExt/cellsize.jl 0.00% <0.00%> (ø)
src/Rasters.jl 100.00% <ø> (ø)
src/extensions.jl 70.00% <75.00%> (-14.62%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rafaqz
Copy link
Owner

rafaqz commented Aug 31, 2023

Thanks!

FYI usually a PR is merged when all the comments are resolved one way or another, by clicking the "resolve conversation" button if you think its been addressed :)

@rafaqz rafaqz merged commit f554fae into rafaqz:main Sep 1, 2023
5 checks passed
@asinghvi17
Copy link
Collaborator

Just to confirm, this is the Haversine distance, i.e., area by great circle calculation, not area by true geodesic (a la Karney/Vincenty)?

@tiemvanderdeure
Copy link
Contributor Author

It uses Girard's theorem. So it doesn't use Haversine distance exactly, but it is an approximation for spheres.

@tiemvanderdeure tiemvanderdeure deleted the cellsize branch April 8, 2024 09:25
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.

Help: Is there a way to get cellsize
4 participants