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

Fix line burning and test rasterize against GDAL #330

Merged
merged 3 commits into from
Nov 5, 2022
Merged

Conversation

rafaqz
Copy link
Owner

@rafaqz rafaqz commented Nov 5, 2022

Fixes line burning and adds some tests against gdal with :center (no line burning) and :touches (line burning).

Closes #326

@ayushpatnaikgit this should also improve the comparisons in #312 . If included an explicit test against ArchGDAL in the tests.

for a small shape, rasterize with boundary=:center is identical to GDAL. The may be some differences for larger shapes.

boundary=:touches has some disagreements with GDAL on pixel corners in the middle of lines but is pretty close after fixing this bug.

@codecov-commenter
Copy link

Codecov Report

Merging #330 (e8eeaf8) into main (81af6c6) will decrease coverage by 0.65%.
The diff coverage is 65.98%.

@@            Coverage Diff             @@
##             main     #330      +/-   ##
==========================================
- Coverage   78.82%   78.16%   -0.66%     
==========================================
  Files          38       38              
  Lines        2970     3037      +67     
==========================================
+ Hits         2341     2374      +33     
- Misses        629      663      +34     
Impacted Files Coverage Δ
src/methods/crop_extend.jl 89.77% <ø> (ø)
src/methods/mosaic.jl 91.46% <ø> (ø)
src/methods/trim.jl 95.65% <ø> (ø)
src/sources/smap.jl 0.00% <0.00%> (ø)
src/methods/inpolygon.jl 44.31% <2.32%> (-40.47%) ⬇️
src/stack.jl 80.13% <57.14%> (-2.73%) ⬇️
src/polygon_ops.jl 79.84% <96.87%> (+1.55%) ⬆️
src/methods/mask.jl 89.09% <100.00%> (ø)
src/methods/rasterize.jl 92.22% <100.00%> (+6.17%) ⬆️
src/sources/ncdatasets.jl 82.49% <100.00%> (+0.45%) ⬆️
... and 2 more

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

@rafaqz rafaqz merged commit 71d5b34 into main Nov 5, 2022
@rafaqz rafaqz deleted the fix_line_burning branch November 5, 2022 12:44
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.

boundary=:touches is broken
2 participants