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

generic constructors like zeros make GeoArrays #221

Merged
merged 1 commit into from
Nov 6, 2021
Merged

Conversation

rafaqz
Copy link
Owner

@rafaqz rafaqz commented Nov 6, 2021

Closes #216

@mkborregaard this turned out to be super simple with a minor change in rafaqz/DimensionalData.jl#333

falses(dims(A)) and trues/zeros/ones/fill/rand will now make a GeoArray if the LookupArray for any dimension is <: AbstractProjected. Which is every X/Y dim made by GeoData.

@codecov-commenter
Copy link

codecov-commenter commented Nov 6, 2021

Codecov Report

Merging #221 (e35b289) into master (a9587af) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #221      +/-   ##
==========================================
+ Coverage   80.71%   80.73%   +0.01%     
==========================================
  Files          20       20              
  Lines        2007     2009       +2     
==========================================
+ Hits         1620     1622       +2     
  Misses        387      387              
Impacted Files Coverage Δ
src/array.jl 81.57% <100.00%> (+0.24%) ⬆️
src/lookup.jl 78.82% <0.00%> (+0.25%) ⬆️

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 a9587af...e35b289. Read the comment docs.

@rafaqz rafaqz merged commit c20bde4 into master Nov 6, 2021
@rafaqz rafaqz deleted the constructors branch November 6, 2021 14:00
@mkborregaard
Copy link
Contributor

Haha this does indicate that the design is good

@rafaqz
Copy link
Owner Author

rafaqz commented Nov 8, 2021

And most of the added code in DD was just trues/falses, the constructor generalisation part is like 5 lines...

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.

Add zeros, ones, rand, fill, falses, and trues to dispatch on Mapped/Projected mode dims
3 participants