Labels leak through MASK #5237

Merged
merged 1 commit into from Feb 11, 2016

Projects

None yet

4 participants

@AsgerPetersen

It seems as if there is a border problem when masking out labelled layers. Sometimes labels at the very edge of the map leak through even when they should definitely be masked away.

Example:
Input dataset:
image

The above dataset masked with a mask which is a union of the polygons at the centre of the map:
image
Geometries are correctly masked, but note the label "Nørre Broby".

Using v6.4.1

@dmorissette
Contributor

Adding PROCESSING FORCE_DRAW_LABEL_CACHE=FLUSH in the last layer before the mask, or in a dummy layer with status default before the mask (to ensure that it is always on) should solve this. See #5100

@tbonfort
Member

@dmorissette I think this is a bug in the masking code, not something related to labelcache flushing. reopening.

@tbonfort tbonfort reopened this Feb 10, 2016
@dmorissette
Contributor

Sorry about this.

@tbonfort tbonfort added a commit to tbonfort/mapserver that referenced this pull request Feb 10, 2016
@tbonfort tbonfort Discard labels outside image extent when using masks (#5237) 3eeeeed
@AsgerPetersen

No problem. I was reading through #5100 and didn't really understand the connection :-)

@tbonfort
Member

@AsgerPetersen can you apply 3eeeeed from my repo and report back ?

@tbonfort tbonfort added a commit to tbonfort/mapserver that referenced this pull request Feb 10, 2016
@tbonfort tbonfort further fixes for #5237 b1dfd3b
@tbonfort
Member

@AsgerPetersen you'll also need b1dfd3b

@AsgerPetersen

@tbonfort Thank you very much! We will give it a spin first thing tomorrow.

@tbonfort tbonfort added a commit to tbonfort/mapserver that referenced this pull request Feb 10, 2016
@tbonfort tbonfort further fixes for #5237 4fd246b
@Telling
Telling commented Feb 11, 2016

I've tested the additions in the issues/5237-masked-labels-bug-branch, and I can confirm that it's indeed working.

Here's a request against the released version of mapserver 7:

ixem6og4aa

And the same request against a build of the fixes in issues/5237-masked-labels-bug:

ygjwk9bzul

@tbonfort tbonfort Discard labels outside image extent when using masks (#5237)
4196ac3
@tbonfort tbonfort merged commit 4196ac3 into mapserver:branch-6-4 Feb 11, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@tbonfort
Member

applied to branch-6-4 in 4196ac3. This was happening on polygons that where close to the image border when the label-point was computed to be outside of the image extent.

@tbonfort
Member

also applied by merging to branch-7-0 in 6c13c20 and master in 27fb2d1

@tbonfort tbonfort deleted the tbonfort:issues/5237-masked-labels-bug branch Feb 11, 2016
@AsgerPetersen

Thank you @tbonfort. Highly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment