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

s2_latlng --> s2_lnglat? #69

Merged
merged 6 commits into from
Jul 9, 2020
Merged

s2_latlng --> s2_lnglat? #69

merged 6 commits into from
Jul 9, 2020

Conversation

paleolimbot
Copy link
Collaborator

@edzer - I know I preached early on about wrapping types to match the S2 names, but it turns out the BigQuery names are more user-friendly, and everything in that world is lng, lat (or x, y). I think a dedicated class for a "point" will be important for optimization later...it's unlikely that point geographies are fast. Keeping the x, y axis order will probably save a lot of headaches...while programming the class I messed up the order way too many times.

I think it's early enough to do a refactor like this...you were right about the point thing all along!

@codecov-commenter
Copy link

codecov-commenter commented Jul 8, 2020

Codecov Report

Merging #69 into master will not change coverage.
The diff coverage is 97.40%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #69   +/-   ##
=======================================
  Coverage   91.95%   91.95%           
=======================================
  Files          35       35           
  Lines        1938     1938           
=======================================
  Hits         1782     1782           
  Misses        156      156           
Impacted Files Coverage Δ
src/s2-bounds.cpp 94.28% <94.28%> (ø)
R/s2-bounds.R 100.00% <100.00%> (ø)
R/s2-geography.R 96.96% <100.00%> (ø)
R/s2-lnglat.R 100.00% <100.00%> (ø)
R/s2-point.R 100.00% <100.00%> (ø)
R/vctrs.R 100.00% <100.00%> (ø)
src/s2-lnglat.cpp 96.55% <100.00%> (ø)
src/s2-point.cpp 96.77% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fc03f2a...35bb0d4. Read the comment docs.

@edzer
Copy link
Member

edzer commented Jul 9, 2020

I now see

> ls(2)[grep("lng", ls(2))]
[1] "as_s2_latlng"    "s2_lat_lng_rect" "s2_latlng"  

I will rename s2_lat_lng_rect into s2_rect. Does as_s2_latlng also need renaming?

@paleolimbot
Copy link
Collaborator Author

I'll clean up the names now...I renamed the rect function to s2_bounds_rect() (with the cap as s2_bounds_cap()...happy to change back, I just had trouble remembering the names while writing the tests and figured a user might as well.

@edzer
Copy link
Member

edzer commented Jul 9, 2020

I like the bounds in their names!

@paleolimbot
Copy link
Collaborator Author

I'll also do the first few release steps on this branch and merge so it's ready for rhub::check_for_cran()/winbuilder

@paleolimbot paleolimbot merged commit c228b9a into master Jul 9, 2020
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.

3 participants