rafaqz / DimensionalData.jl

Named dimensions and indexing for julia arrays and other data
https://rafaqz.github.io/DimensionalData.jl/stable/
MIT License
281 stars 41 forks source link

Touches #419

Closed rafaqz closed 1 year ago

rafaqz commented 1 year ago

Adds a Touches selector that returns the largest possible range touching an interval.

This is reqiured for rasterization in https://github.com/rafaqz/Rasters.jl/issues/312, where we want to select the maximum possible subset of an array that a Polygon or Extent touches. Otherwise we occasionally miss some pixels at the edges.

Note this is only different to .. or Between when the sampling is Intervals. For Point it will make no difference as it's identical to a closed interval.

codecov-commenter commented 1 year ago

Codecov Report

Merging #419 (db3b477) into main (5135cb5) will decrease coverage by 0.08%. The diff coverage is 77.53%.

@@            Coverage Diff             @@
##             main     #419      +/-   ##
==========================================
- Coverage   89.94%   89.86%   -0.09%     
==========================================
  Files          35       35              
  Lines        2398     2527     +129     
==========================================
+ Hits         2157     2271     +114     
- Misses        241      256      +15     
Impacted Files Coverage Δ
src/DimensionalData.jl 100.00% <ø> (ø)
src/Dimensions/indexing.jl 81.53% <0.00%> (-5.35%) :arrow_down:
src/LookupArrays/LookupArrays.jl 100.00% <ø> (ø)
src/LookupArrays/selector.jl 87.13% <81.06%> (-2.42%) :arrow_down:
src/Dimensions/primitives.jl 93.80% <0.00%> (+1.11%) :arrow_up:
src/array/array.jl 96.07% <0.00%> (+2.32%) :arrow_up:
src/array/broadcast.jl 80.64% <0.00%> (+6.45%) :arrow_up:

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