Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pal] Improve polygon candidate generation logic
Instead of basing the initial dx/dy for the grid-based polygon candidate generation on the size of the label itself, instead use either the engine setting for polygon label density OR try and infer this from the maximum number of candidates to generate for the polygon. This avoids numerous issues with the label-size based approach: - small labels (e.g. 1-2 digit labels) would generate a HUGE number of candidates because the initial dx/dy were very small - large labels would generate very few candidates, giving few options for placement within these polygons (due to initially large dx/dy) - by generating much more candidates then desired for small labels, all the candidates further from the polygon centers would be culled at a later step, meaning that the only candidates available for the labeling problem solving would be clustered around a very small area of the polygon (instead of distributed over the whole polygon)
- Loading branch information
1 parent
c062b52
commit e0197fe
Showing
3 changed files
with
87 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters