Merge branch 'master' into mapnik-geometry

This commit is contained in:
artemp 2015-03-19 19:17:01 +01:00
commit 8a0b4a6b6e
28 changed files with 812 additions and 37 deletions

View file

@ -30,6 +30,7 @@
#include <bitset>
#include <iostream>
#include <cstdlib>
#include <algorithm>
namespace mapnik {
@ -176,9 +177,13 @@ public:
* */
void from_string(std::string const& str)
{
// TODO: Enum value strings with underscore are deprecated in Mapnik 3.x
// and support will be removed in Mapnik 4.x.
std::string str_copy(str);
std::replace(str_copy.begin(), str_copy.end(), '_', '-');
for (unsigned i = 0; i < THE_MAX; ++i)
{
if (str == our_strings_[i])
if (str_copy == our_strings_[i])
{
value_ = static_cast<ENUM>(i);
return;

View file

@ -38,7 +38,7 @@ template <>
class image<null_t>
{
public:
using pixel_type = typename null_t::type;
using pixel_type = null_t::type;
static const image_dtype dtype = null_t::id;
private:
public:

View file

@ -76,7 +76,7 @@ private:
bool collision(box2d<double> const& box, const value_unicode_string &repeat_key, bool line_placement) const;
// Adds marker to glyph_positions and to collision detector. Returns false if there is a collision.
bool add_marker(glyph_positions_ptr glyphs, pixel_position const& pos) const;
// Maps upright==auto, left_only and right_only to left,right to simplify processing.
// Maps upright==auto, left-only and right-only to left,right to simplify processing.
// angle = angle of at start of line (to estimate best option for upright==auto)
text_upright_e simplify_upright(text_upright_e upright, double angle) const;
box2d<double> get_bbox(text_layout const& layout, glyph_info const& glyph, pixel_position const& pos, rotation const& rot);

View file

@ -171,10 +171,10 @@ bool group_symbolizer_helper::collision(box2d<double> const& box, value_unicode_
{
if (!detector_.extent().intersects(box)
||
(text_props_->avoid_edges && !query_extent_.contains(box))
(text_props_->avoid_edges && !dims_.contains(box))
||
(text_props_->minimum_padding > 0 &&
!query_extent_.contains(box + (scale_factor_ * text_props_->minimum_padding)))
!dims_.contains(box + (scale_factor_ * text_props_->minimum_padding)))
||
(!text_props_->allow_overlap &&
((repeat_key.length() == 0 && !detector_.has_placement(box, text_props_->margin * scale_factor_))

View file

@ -35,7 +35,7 @@ IMPLEMENT_ENUM( line_cap_e, line_cap_strings )
static const char * line_join_strings[] = {
"miter",
"miter_revert",
"miter-revert",
"round",
"bevel",
""
@ -171,8 +171,8 @@ static const char * text_upright_strings[] = {
"auto-down",
"left",
"right",
"left_only",
"right_only",
"left-only",
"right-only",
""
};
IMPLEMENT_ENUM(text_upright_e, text_upright_strings)

View file

@ -303,7 +303,7 @@ bool placement_finder::single_line_placement(vertex_cache &pp, text_upright_e or
begin.restore();
return single_line_placement(pp, real_orientation == UPRIGHT_RIGHT ? UPRIGHT_LEFT : UPRIGHT_RIGHT);
}
// upright==left_only or right_only and more than 50% of characters upside down => no placement
// upright==left-only or right-only and more than 50% of characters upside down => no placement
else if (orientation == UPRIGHT_LEFT_ONLY || orientation == UPRIGHT_RIGHT_ONLY)
{
return false;

View file

@ -0,0 +1,138 @@
{
"keys": [
"",
"1",
"2"
],
"data": {},
"grid": [
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" !!!!! ###### ",
" !!!!! ###### ",
" !!!!! ###### ",
" !!!!! ###### ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
]
}

View file

@ -0,0 +1,138 @@
{
"keys": [
"",
"1",
"2"
],
"data": {},
"grid": [
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
]
}

View file

@ -0,0 +1,138 @@
{
"keys": [
"",
"1",
"2"
],
"data": {},
"grid": [
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" !!!!! ###### ",
" !!!!! ###### ",
" !!!!! ###### ",
" !!!!! ###### ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
]
}

View file

@ -0,0 +1,138 @@
{
"keys": [
"",
"1",
"2"
],
"data": {},
"grid": [
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" !!!!!!!!!!! ########### ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
]
}

View file

@ -93,8 +93,8 @@
" !!!! ##### $$$$ %%%%% &&&& ''''' ((((( ((((( '''' &&&&& %%%%% $$$$$ ##### !!!!! ",
" !!!! ! ##### $$$$ %%%%% &&&& ''''' ((((( ((((( '''' &&&&& %%%%% $$$$$ ##### !!!!!! ",
" !!!!! ##### $$$$ %%%%% &&&& ''''' ((((( ((((( '''' &&&&& %%%%% $$$$$ ##### !!!!! ",
" !!!!! ##### $$$$ %%%%% &&&& ''''' (((((( (((((( '''' &&&&& %%%%% $$$$$ ##### !!!!! ",
" !!!!! ##### $$$$ %%%%% &&&& ''''' (((((( (((((( '''' &&&&& %%%%% $$$$$ ##### !!!!! ",
" !!!!! ##### $$$$ %%%%% &&&& ''''' ((((( ((((( '''' &&&&& %%%%% $$$$$ ##### !!!!! ",
" !!!!! ##### $$$$ %%%%% &&&& ''''' ((((( ((((( '''' &&&&& %%%%% $$$$$ ##### !!!!! ",
" !!!! ##### $$$$ %%%%% &&&& ''''' ((((( ((((( '''' &&&&& %%%%% $$$$$ ##### !!!!! ",
" !!!!! ##### $$$$ %%%%% &&&& ''''' ((((( ((((( '''' &&&&& %%%%% $$$$$ ##### !!!!! ",
" !!!! ##### $$$$ %%%%% &&&& ''''' ((((( ((((( '''' &&&&& %%%%% $$$$$ ##### !!!!! ",
@ -127,10 +127,10 @@
" !!!!!! ##### $$$$$ %%%%% &&&&& '''' ((((( ((((( ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!! ##### $$$$$ %%%%% &&&&& '''' ((((( ((((( ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& '''' ((((( ((((( ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& ' '''' ((((( ((((( ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!! ##### $$$$$ %%%%% &&&&& ' '''' ((((( ((((( ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& '''' ((((( ((((( ''''' ' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& '''' ((((( ((((( ''''' ' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& '''' ((((( ((((( ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!! ##### $$$$$ %%%%% &&&&& '''' ((((( ((((( ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& '''' ((((( ((((( ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& '''' ((((( ((((( ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!! ##### $$$$$ %%%%% &&&&& '''' ((((( ((((( ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!! ##### $$$$$ %%%%% &&&&& '''' ((((( ((((( ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& ' '''' ((((( ((((( ''''' &&&&& %%%% $$$$$ #### !!!!! ",
@ -155,12 +155,12 @@
" !!!!! ##### $$$$$ %%%%% &&&&& '''' ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!! ##### $$$$$ %%%%% &&&&& '''' ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& '''' ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!! ##### $$$$$ %%%%% &&&&& '''' ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!! ##### $$$$$ %%%%% &&&&& '''' '''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!! ##### $$$$$ %%%%% &&&&& ''''''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!! ##### $$$$$ %%%%% &&&&& ''''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& ''''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& ' ''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& ' ' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& ''' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& ' &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!! ##### $$$$$ %%%%% &&&&&& &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!!! ##### $$$$$ %%%%% &&&&& &&&&& %%%% $$$$$ #### !!!!! ",
" !!!!! ##### $$$$$ %%%%% &&&&& &&&&& %%%% $$$$$ #### !!!!! ",

View file

@ -79,16 +79,16 @@
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ #########!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ ########!!!!!!!!!! ",
" !!!!!!!!!#########$$$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ ########!!!!!!!!!! ",
" !!!!!!!!!#########$$$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((((( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ #########!!!!!!!!! ",
" !!!!!!!!!#########$$$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ #########!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ ########!!!!!!!!!! ",
" !!!!!!!!!#########$$$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ #########!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ ########!!!!!!!!!! ",
" !!!!!!!!!#########$$$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' (((((((((( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ #########!!!!!!!!! ",
" !!!!!!!!!#########$$$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ #########!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&&'''''''' ((((((((((( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ #########!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&&'''''''' ((((((((( ( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ #########!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&'&''''''' ((((((((( ((((((((( '''''''&'&&&&&&&&& %%%%%%%%%$$$$$$$$$ ########!!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&&&''''''' ((((((((( ((((((((( '''''''&&&&&&&&&&& %%%%%%%%%$$$$$$$$$ ########!!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ((((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ #########!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&&&''''''' ((((((((( ( ((((((((( '''''''&&&&&&&&&&& %%%%%%%%%$$$$$$$$$ ########!!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ #########!!!!!!!!! ",
" !!!!!!!!!#########$$$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ ########!!!!!!!!!! ",
" !!!!!!!!!#########$$$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ #########!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ((((((((( '''''''''&&&&&&&&& %%%%%%%%%$$$$$$$$$ ########!!!!!!!!!! ",
@ -113,7 +113,7 @@
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ((((((( '''''' &&&&&&& %%%%%% $$$$$$$ ###### !!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ((((( ''''' &&&&& %%%%% $$$$$ ###### !!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( ((((((( ''''''' &&&&&&& %%%%%%% $$$$$$$ ######## !!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&'''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
@ -125,8 +125,8 @@
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&''''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&'&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&'&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%%%$$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
@ -147,9 +147,9 @@
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' ((((((((( (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!!! ",
" !!!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' (((((((((((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!!! ",
" !!!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' (((((((((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' (((((((((((((''''''''' '&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' (((((((((((''''''''' ''&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' (((((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!!! ",
" !!!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' (((((((((((((''''''''''&&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' (((((((((((''''''''' '&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' (((((((((''''''''' &'&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!!! ",
" !!!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' (((((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' (((((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&''''''''' (((''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!!! ",
@ -158,9 +158,9 @@
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&'''''''''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" ! !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&'''''''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !! !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&'''''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&'''''''''' &'&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&'''''''' &'&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&'''''' &'&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&'''''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&'''''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&'''''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&'''' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&&'' &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",
" !!!!!!!!!######### $$$$$$$$$%%%%%%%%% &&&&&&&&& &&&&&&&&&%%%%%%%%% $$$$$$$$$######### !!!!!!!!! ",

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View file

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Without unlock-image -->
<!DOCTYPE Map>
<Map background-color="green" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" minimum-version="2.0.0">
<Parameters>
<Parameter name="sizes">512,512</Parameter>
</Parameters>
<!-- the aim here is to test the "repeat-key" parameter. it is
supposed to stop collidable / placeable items from being
too close, even if they're on different features. -->
<Layer name="alpha" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>alpha</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
wkt,key1,key2
"POINT(3.3 0)",foo,1
"POINT(6.7 0)",bar,2
</Parameter>
</Datasource>
</Layer>
<Style name="alpha">
<Rule>
<PointSymbolizer ignore-placement="true"/>
<GroupSymbolizer start-column="1" num-columns="1" placement="point" avoid-edges="false" repeat-key="[key%]">
<PairLayout item-margin="1"/>
<GroupRule>
<ShieldSymbolizer file="../../data/svg/rect.svg" face-name="DejaVu Sans Book" size="10" minimum-distance="1" placement="point" dy="0" fill="#ff0000">[key%]</ShieldSymbolizer>
</GroupRule>
</GroupSymbolizer>
</Rule>
</Style>
<Layer name="beta" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>beta</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
wkt,name1,ref1,name2,ref2
"LINESTRING(0 -0.6, 10 -0.6)",One,1,Two,2
"LINESTRING(0 -1.2, 10 -1.2)",One,1,Two,2
"LINESTRING(0 -1.8, 10 -1.8)",One,1,Two,2
"LINESTRING(0 -2.4, 10 -2.4)",One,1,Two,2
</Parameter>
</Datasource>
</Layer>
<Style name="beta">
<Rule>
<GroupSymbolizer start-column="1" num-columns="1" placement="line" avoid-edges="false" repeat-distance="20" spacing="1" repeat-key="bar">
<PairLayout item-margin="1"/>
<GroupRule>
<ShieldSymbolizer file="../../data/svg/rect.svg" face-name="DejaVu Sans Book" size="10" placement="point" dy="0" fill="#ffffff">bar</ShieldSymbolizer>
</GroupRule>
</GroupSymbolizer>
</Rule>
</Style>
<Layer name="gamma" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>gamma</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
wkt,name1,ref1,name2,ref2
"LINESTRING(0 0.6, 10 0.6)",One,1,Two,2
"LINESTRING(0 1.2, 10 1.2)",One,1,Two,2
"LINESTRING(0 1.8, 10 1.8)",One,1,Two,2
"LINESTRING(0 2.4, 10 2.4)",One,1,Two,2
</Parameter>
</Datasource>
</Layer>
<Style name="gamma">
<Rule>
<GroupSymbolizer start-column="1" num-columns="1" placement="line" avoid-edges="true" repeat-distance="20" spacing="1" repeat-key="foo">
<PairLayout item-margin="1"/>
<GroupRule>
<ShieldSymbolizer file="../../data/svg/rect.svg" face-name="DejaVu Sans Book" size="10" placement="point" dy="0" fill="#000000">foo</ShieldSymbolizer>
</GroupRule>
</GroupSymbolizer>
</Rule>
</Style>
<!-- for framing -->
<Layer name="frame" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>frame</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
wkt,nr
"POINT(0 5)",1
"POINT(0 -5)",2
"POINT(10 5)",3
"POINT(10 -5)",4
</Parameter>
</Datasource>
</Layer>
<Style name="frame">
<Rule>
<PointSymbolizer/>
<DebugSymbolizer/>
</Rule>
</Style>
</Map>

View file

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Without unlock-image -->
<!DOCTYPE Map>
<Map background-color="green" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" minimum-version="2.0.0">
<Parameters>
<Parameter name="sizes">512,512</Parameter>
</Parameters>
<!-- the aim here is to test the "repeat-key" parameter. it is
supposed to stop collidable / placeable items from being
too close, even if they're on different features. -->
<Layer name="alpha" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>alpha</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
wkt,key1,key2
"POINT(3.3 0)",foo,1
"POINT(6.7 0)",bar,2
</Parameter>
</Datasource>
</Layer>
<Style name="alpha">
<Rule>
<PointSymbolizer ignore-placement="true"/>
<GroupSymbolizer start-column="1" num-columns="1" placement="point" avoid-edges="false" repeat-key="[key%]">
<PairLayout item-margin="1"/>
<GroupRule>
<ShieldSymbolizer file="../../data/svg/rect.svg" face-name="DejaVu Sans Book" size="10" minimum-distance="1" placement="point" dy="0" fill="#ff0000">[key%]</ShieldSymbolizer>
</GroupRule>
</GroupSymbolizer>
</Rule>
</Style>
<Layer name="beta" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>beta</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
wkt,name1,ref1,name2,ref2
"LINESTRING(0 -0.6, 10 -0.6)",One,1,Two,2
"LINESTRING(0 -1.2, 10 -1.2)",One,1,Two,2
"LINESTRING(0 -1.8, 10 -1.8)",One,1,Two,2
"LINESTRING(0 -2.4, 10 -2.4)",One,1,Two,2
</Parameter>
</Datasource>
</Layer>
<Style name="beta">
<Rule>
<GroupSymbolizer start-column="1" num-columns="1" placement="line" avoid-edges="false" repeat-distance="20" spacing="1" repeat-key="bar">
<PairLayout item-margin="1"/>
<GroupRule>
<ShieldSymbolizer file="../../data/svg/rect.svg" face-name="DejaVu Sans Book" size="10" placement="point" dy="0" fill="#ffffff">bar</ShieldSymbolizer>
</GroupRule>
</GroupSymbolizer>
</Rule>
</Style>
<Layer name="gamma" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>gamma</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
wkt,name1,ref1,name2,ref2
"LINESTRING(0 0.6, 10 0.6)",One,1,Two,2
"LINESTRING(0 1.2, 10 1.2)",One,1,Two,2
"LINESTRING(0 1.8, 10 1.8)",One,1,Two,2
"LINESTRING(0 2.4, 10 2.4)",One,1,Two,2
</Parameter>
</Datasource>
</Layer>
<Style name="gamma">
<Rule>
<GroupSymbolizer start-column="1" num-columns="1" placement="line" avoid-edges="false" minimum-padding="15" repeat-distance="20" spacing="1" repeat-key="foo">
<PairLayout item-margin="1"/>
<GroupRule>
<ShieldSymbolizer file="../../data/svg/rect.svg" face-name="DejaVu Sans Book" size="10" placement="point" dy="0" fill="#000000">foo</ShieldSymbolizer>
</GroupRule>
</GroupSymbolizer>
</Rule>
</Style>
<!-- for framing -->
<Layer name="frame" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>frame</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
wkt,nr
"POINT(0 5)",1
"POINT(0 -5)",2
"POINT(10 5)",3
"POINT(10 -5)",4
</Parameter>
</Datasource>
</Layer>
<Style name="frame">
<Rule>
<PointSymbolizer/>
<DebugSymbolizer/>
</Rule>
</Style>
</Map>

View file

@ -20,11 +20,11 @@
<MarkersSymbolizer file="shape://arrow" placement="line" transform="scale(.5,.5)"/>
<TextSymbolizer face-name="DejaVu Sans Book" size="10" placement="line" upright="right" dy="10" allow-overlap="true">"right: --&gt;"</TextSymbolizer>
<TextSymbolizer face-name="DejaVu Sans Book" size="10" placement="line" upright="left" dy="-10" allow-overlap="true">"left: &lt;--"</TextSymbolizer>
<TextSymbolizer face-name="DejaVu Sans Book" size="10" placement="line" upright="left_only" allow-overlap="true"
<TextSymbolizer face-name="DejaVu Sans Book" size="10" placement="line" upright="left-only" allow-overlap="true"
placement-type="list">"left only &lt;--"
<Placement upright="right_only">"right only --&gt;"</Placement>
<Placement upright="right_only">"--&gt;"</Placement>
<Placement upright="left_only">"&lt;--"</Placement>
<Placement upright="right-only">"right only --&gt;"</Placement>
<Placement upright="right-only">"--&gt;"</Placement>
<Placement upright="left-only">"&lt;--"</Placement>
</TextSymbolizer>
</Rule>
</Style>

View file

@ -18,8 +18,8 @@
2, "LINESTRING(0.8 0, 0 -0.8, -0.8 0, 0 0.8, 0.8 0)", "auto-down"
3, "LINESTRING(0.7 0, 0 -0.7, -0.7 0, 0 0.7, 0.7 0)", "left"
4, "LINESTRING(0.6 0, 0 -0.6, -0.6 0, 0 0.6, 0.6 0)", "right"
5, "LINESTRING(0.5 0, 0 -0.5, -0.5 0, 0 0.5, 0.5 0)", "left_only"
6, "LINESTRING(0.4 0, 0 -0.4, -0.4 0, 0 0.4, 0.4 0)", "right_only"
5, "LINESTRING(0.5 0, 0 -0.5, -0.5 0, 0 0.5, 0.5 0)", "left-only"
6, "LINESTRING(0.4 0, 0 -0.4, -0.4 0, 0 0.4, 0.4 0)", "right-only"
</Parameter>
</Datasource>
</Layer>