Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/gmt_shore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,11 @@ int gmt_assemble_shore (struct GMT_CTRL *GMT, struct GMT_SHORE *c, int dir, bool
}

wet_or_dry = (dir == 1) ? 1 : 0; /* If dir == 1 we paint the dry parts */
use_this_level = (high_level%2 == wet_or_dry && high_level >= c->min_level);
/* The min_level filter is meant to suppress small coastal features, not the ocean background.
* When filling water (-S) and the bin corners are all ocean (high_level == 0), we must paint
* the bin regardless of min_level, otherwise -A with low > 0 leaves ocean bins blank, producing
* a grid-pattern of missing fill (see bug #8942). */
use_this_level = (high_level%2 == wet_or_dry && (high_level >= c->min_level || (wet_or_dry == 0 && high_level == 0)));

if (c->ns == 0 && !use_this_level) return (0); /* No polygons for this bin */

Expand Down
Loading