diff --git a/src/group/group_symbolizer_helper.cpp b/src/group/group_symbolizer_helper.cpp index 8af250436..f3086a101 100644 --- a/src/group/group_symbolizer_helper.cpp +++ b/src/group/group_symbolizer_helper.cpp @@ -164,9 +164,9 @@ bool group_symbolizer_helper::collision(box2d const& box, value_unicode_ !query_extent_.contains(box + (scale_factor_ * placement_->properties.minimum_padding))) || (!placement_->properties.allow_overlap && - ((repeat_key.length() == 0 && !detector_.has_placement(box, placement_->properties.minimum_distance * scale_factor_)) + ((repeat_key.length() == 0 && !detector_.has_placement(box, placement_->properties.margin * scale_factor_)) || - (repeat_key.length() > 0 && !detector_.has_placement(box, placement_->properties.minimum_distance * scale_factor_, + (repeat_key.length() > 0 && !detector_.has_placement(box, placement_->properties.margin * scale_factor_, repeat_key, placement_->properties.repeat_distance * scale_factor_)))) ) { diff --git a/tests/visual_tests/grids/group-symbolizer-3-512-256-1.0-grid-reference.json b/tests/visual_tests/grids/group-symbolizer-3-512-256-1.0-grid-reference.json new file mode 100644 index 000000000..ef2ac14e2 --- /dev/null +++ b/tests/visual_tests/grids/group-symbolizer-3-512-256-1.0-grid-reference.json @@ -0,0 +1,74 @@ +{ + "keys": [ + "", + "1", + "2" + ], + "data": {}, + "grid": [ + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ! # ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + ] +} \ No newline at end of file diff --git a/tests/visual_tests/grids/group-symbolizer-3-512-256-2.0-grid-reference.json b/tests/visual_tests/grids/group-symbolizer-3-512-256-2.0-grid-reference.json new file mode 100644 index 000000000..ef2ac14e2 --- /dev/null +++ b/tests/visual_tests/grids/group-symbolizer-3-512-256-2.0-grid-reference.json @@ -0,0 +1,74 @@ +{ + "keys": [ + "", + "1", + "2" + ], + "data": {}, + "grid": [ + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ! # ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + ] +} \ No newline at end of file diff --git a/tests/visual_tests/images/group-symbolizer-3-512-256-1.0-agg-reference.png b/tests/visual_tests/images/group-symbolizer-3-512-256-1.0-agg-reference.png new file mode 100644 index 000000000..7de094f5f Binary files /dev/null and b/tests/visual_tests/images/group-symbolizer-3-512-256-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/group-symbolizer-3-512-256-1.0-cairo-reference.png b/tests/visual_tests/images/group-symbolizer-3-512-256-1.0-cairo-reference.png new file mode 100644 index 000000000..636ea4468 Binary files /dev/null and b/tests/visual_tests/images/group-symbolizer-3-512-256-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/group-symbolizer-3-512-256-2.0-agg-reference.png b/tests/visual_tests/images/group-symbolizer-3-512-256-2.0-agg-reference.png new file mode 100644 index 000000000..c97fa95ed Binary files /dev/null and b/tests/visual_tests/images/group-symbolizer-3-512-256-2.0-agg-reference.png differ diff --git a/tests/visual_tests/images/group-symbolizer-3-512-256-2.0-cairo-reference.png b/tests/visual_tests/images/group-symbolizer-3-512-256-2.0-cairo-reference.png new file mode 100644 index 000000000..2ff434504 Binary files /dev/null and b/tests/visual_tests/images/group-symbolizer-3-512-256-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/styles/group-symbolizer-2.xml b/tests/visual_tests/styles/group-symbolizer-2.xml index 400d44fd3..45a3336b6 100644 --- a/tests/visual_tests/styles/group-symbolizer-2.xml +++ b/tests/visual_tests/styles/group-symbolizer-2.xml @@ -35,7 +35,7 @@ lat,long,name1,ref1,name2,ref2 + + + grouped + + csv + +lat,long,name1,ref1,name2,ref2,margin +0,-0.35,One,1,Two,2,0 +0,0.35,One,1,Two,2,30 + + + + + + + + frame + + csv + +lat,long,nr +-0.5,-1,0 +-0.5,1,1 +0.5,-1,2 +0.5,1,3 + + + + + + + center + + csv + +lat,long +0,-0.35 +0,0.35 + + + + + + + diff --git a/tests/visual_tests/test.py b/tests/visual_tests/test.py index a7c432285..ea220cf67 100755 --- a/tests/visual_tests/test.py +++ b/tests/visual_tests/test.py @@ -267,6 +267,7 @@ files = { 'polygon-winding-order': {'sizes':[(300,300)]}, 'group-symbolizer-1':{'sizes':[(512,512)]}, 'group-symbolizer-2':{'sizes':[(512,512)]}, + 'group-symbolizer-3':{'sizes':[(512,256)]}, 'group-symbolizer-line-1':{'sizes':[(512,512)]}, 'group-symbolizer-line-2':{'sizes':[(512,512)]}, 'text-charplacement':{'sizes':[(512,512)]},