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

Contour: include minimum raster value as contour line when it exactly matches the first level #10170

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

rouault
Copy link
Member

@rouault rouault commented Jun 9, 2024

Fixes #10167

There's currently an asymmetry since the maximum raster value is included. This is due how the marching square thresholding compares pixel values to the candidate contour levels. Add a special case to modify the comparison for the level that matches the minimum raster value.

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 69.165% (+0.002%) from 69.163%
when pulling 3d91b19 on rouault:fix_10167
into e473249 on OSGeo:master.

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 69.173%. remained the same
when pulling 41795b9 on rouault:fix_10167
into c61ecde on OSGeo:master.

alg/marching_squares/square.h Outdated Show resolved Hide resolved
alg/marching_squares/utility.h Outdated Show resolved Hide resolved
alg/marching_squares/utility.h Outdated Show resolved Hide resolved
… matches the first level

Fixes OSGeo#10167

There's currently an asymmetry since the maximum raster value is
included. This is due how the marching square thresholding compares
pixel values to the candidate contour levels. Add a special case to
modify the comparison for the level that matches the minimum raster
value.
@rouault rouault merged commit 0decb44 into OSGeo:master Jun 18, 2024
34 of 35 checks passed
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.

gdal_contour skips first contour when on edge
3 participants