Merge branch '2.3.x' of github.com:mapnik/mapnik into 2.3.x
This commit is contained in:
commit
798dd3124b
4 changed files with 16 additions and 5 deletions
|
@ -268,7 +268,7 @@ struct geometry_generator_grammar :
|
|||
;
|
||||
|
||||
polygon_coord %= ( &uint_(mapnik::SEG_MOVETO) << eps[_r1 += 1]
|
||||
<< karma::string[ if_ (_r1 > 1) [_1 = "],["]
|
||||
<< karma::string[ if_ (_r1 > 1u) [_1 = "],["]
|
||||
.else_[_1 = '[' ]]
|
||||
|
|
||||
&uint_(mapnik::SEG_LINETO)
|
||||
|
@ -340,9 +340,9 @@ struct multi_geometry_generator_grammar :
|
|||
geometry = ( &bool_(true)[_1 = not_empty_(_val)] << lit("{\"type\":")
|
||||
<< geometry_types[_1 = phoenix::at_c<0>(_a)][_a = multi_type_(_val)]
|
||||
<< lit(",\"coordinates\":")
|
||||
<< karma::string[ phoenix::if_ (phoenix::at_c<0>(_a) > 3) [_1 = '['].else_[_1 = ""]]
|
||||
<< karma::string[ phoenix::if_ (phoenix::at_c<0>(_a) > 3u) [_1 = '['].else_[_1 = ""]]
|
||||
<< coordinates
|
||||
<< karma::string[ phoenix::if_ (phoenix::at_c<0>(_a) > 3) [_1 = ']'].else_[_1 = ""]]
|
||||
<< karma::string[ phoenix::if_ (phoenix::at_c<0>(_a) > 3u) [_1 = ']'].else_[_1 = ""]]
|
||||
<< lit('}')) | lit("null")
|
||||
;
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ namespace mapnik { namespace util {
|
|||
;
|
||||
|
||||
svg_path %= ((&uint_(mapnik::SEG_MOVETO) << lit('M')
|
||||
| &uint_(mapnik::SEG_LINETO) [_a +=1] << karma::string [if_(_a == 1) [_1 = "L" ].else_[_1 =""]])
|
||||
| &uint_(mapnik::SEG_LINETO) [_a +=1] << karma::string [if_(_a == 1u) [_1 = "L" ].else_[_1 =""]])
|
||||
<< lit(' ') << coordinate << lit(' ') << coordinate) % lit(' ')
|
||||
;
|
||||
|
||||
|
|
|
@ -67,6 +67,17 @@ public:
|
|||
close();
|
||||
throw mapnik::datasource_exception(err_msg);
|
||||
}
|
||||
PGresult *result = PQexec(conn_, "SET DEFAULT_TRANSACTION_READ_ONLY = TRUE;");
|
||||
bool ok = (result && (PQresultStatus(result) == PGRES_COMMAND_OK));
|
||||
if ( result ) PQclear(result);
|
||||
if ( ! ok ) {
|
||||
std::string err_msg = "Postgis Plugin: ";
|
||||
err_msg += status();
|
||||
err_msg += "\nConnection string: '";
|
||||
err_msg += connection_str;
|
||||
err_msg += "'\n";
|
||||
throw mapnik::datasource_exception(err_msg);
|
||||
}
|
||||
}
|
||||
|
||||
~Connection()
|
||||
|
|
|
@ -97,7 +97,7 @@ wkt_generator<OutputIterator, Geometry>::wkt_generator(bool single)
|
|||
|
||||
polygon_coord %= ( &uint_(mapnik::SEG_MOVETO)
|
||||
<< eps[_r1 += 1][_a = _x(_val)][ _b = _y(_val)]
|
||||
<< string[ if_ (_r1 > 1) [_1 = "),("]
|
||||
<< string[ if_ (_r1 > 1u) [_1 = "),("]
|
||||
.else_[_1 = "("]]
|
||||
|
|
||||
&uint_(mapnik::SEG_LINETO)
|
||||
|
|
Loading…
Add table
Reference in a new issue