From 9d359ff3df8f76a16d5c4e5c094eca1087fe6772 Mon Sep 17 00:00:00 2001 From: bergwerkgis Date: Fri, 5 Feb 2016 11:05:12 +0000 Subject: [PATCH 1/8] AppVeyor: new try, nr.1 --- scripts/appveyor-system-info.ps1 | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/scripts/appveyor-system-info.ps1 b/scripts/appveyor-system-info.ps1 index 550cfb530..d41683dfb 100644 --- a/scripts/appveyor-system-info.ps1 +++ b/scripts/appveyor-system-info.ps1 @@ -1,6 +1,16 @@ $PSVersionTable $PSVersionTable.PSVersion +$comp_name = $env:COMPUTERNAME +$user_name = $env:USERNAME +Write-Host $comp_name $user_name + +$on_appveyor = $false +if($comp_name -eq "appveyor-vm" -And $user_name -eq "appveyor"){ + $on_appveyor = $true +} + + $SystemManaged = Get-WmiObject -Class Win32_ComputerSystem | % {$_.AutomaticManagedPagefile} $total_physicalmem = gwmi Win32_ComputerSystem | % {[Math]::round($_.TotalPhysicalMemory/1MB,0)} $physical_mem = get-ciminstance -class 'cim_physicalmemory' | % { $_.Capacity/1024/1024} @@ -17,8 +27,25 @@ Write-Host "page file size : "$PageFileSize Write-Host "InitialSize : "${CurrentPageFile}.InitialSize Write-Host "MaximumSize : "$CurrentPageFile.MaximumSize -if($env:APPVEYOR -eq "true"){ +if($on_appveyor -eq $true){ + Write-Host !!!!!!! on AppVeyor: changing page file settings !!!!!!!!!! + + $dirs = ( + "C:\qt", + "C:\Users\appveyor\AppData\Local\Microsoft\Web Platform Installer", + "C:\Program Files\Microsoft SQL Server", + "C:\ProgramData\Package Cache" + ) + Foreach($dir in $dirs){ + if(Test-Path $dir) { + Write-Host found $dir + Remove-Item $dir -Force -Recurse + } else { + Write-Host not found $dir + } + } + #disable automatically managed page file settings $c = Get-WmiObject Win32_computersystem -EnableAllPrivileges if($c.AutomaticManagedPagefile){ From eeb1507c6de4af915516a21ef3284dd4816c8356 Mon Sep 17 00:00:00 2001 From: bergwerkgis Date: Fri, 5 Feb 2016 11:13:09 +0000 Subject: [PATCH 2/8] AppVeyor: new try, nr.2 --- scripts/appveyor-system-info.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/appveyor-system-info.ps1 b/scripts/appveyor-system-info.ps1 index d41683dfb..586ef2de2 100644 --- a/scripts/appveyor-system-info.ps1 +++ b/scripts/appveyor-system-info.ps1 @@ -6,7 +6,7 @@ $user_name = $env:USERNAME Write-Host $comp_name $user_name $on_appveyor = $false -if($comp_name -eq "appveyor-vm" -And $user_name -eq "appveyor"){ +if($comp_name -like 'APPVYR*' -And $user_name -eq "appveyor"){ $on_appveyor = $true } From bcc7495a8728e71efbfa6ee397af3da58ea1958d Mon Sep 17 00:00:00 2001 From: artemp Date: Fri, 5 Feb 2016 13:07:31 +0100 Subject: [PATCH 3/8] transform grammar - fix optional seprator logic --- include/mapnik/transform_expression_grammar_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mapnik/transform_expression_grammar_impl.hpp b/include/mapnik/transform_expression_grammar_impl.hpp index f72126eb7..7f5317e69 100644 --- a/include/mapnik/transform_expression_grammar_impl.hpp +++ b/include/mapnik/transform_expression_grammar_impl.hpp @@ -58,7 +58,7 @@ transform_expression_grammar::transform_expression_grammar() // separated by whitespace and/or a comma. qi::no_skip_type no_skip; - start = transform_ % no_skip[char_(", ")] ; + start = transform_ % no_skip[*char_(", ")] ; transform_ = matrix | translate | scale | rotate | skewX | skewY ; From cb708d7f5a0f978f179a0782c286d4fb61454c69 Mon Sep 17 00:00:00 2001 From: artemp Date: Fri, 5 Feb 2016 16:28:12 +0100 Subject: [PATCH 4/8] transform_grammar: correct and simplify rules per https://github.com/mapnik/mapnik/commit/bcc7495a8728e71efbfa6ee397af3da58ea1958d#commitcomment-15915607 image_filter: relax `agg-stack-blur` rule to allow `agg-stack-blur,agg-stack-blur(),agg-stack-blur(1),agg-stack-blur(1,1)` syntax + add image filter parsing tests --- include/mapnik/image_filter_grammar_impl.hpp | 13 +++--- .../transform_expression_grammar_impl.hpp | 4 +- test/unit/imaging/image_filter.cpp | 41 +++++++++++++++++++ 3 files changed, 47 insertions(+), 11 deletions(-) diff --git a/include/mapnik/image_filter_grammar_impl.hpp b/include/mapnik/image_filter_grammar_impl.hpp index 7b8212ec7..168d9a112 100644 --- a/include/mapnik/image_filter_grammar_impl.hpp +++ b/include/mapnik/image_filter_grammar_impl.hpp @@ -57,14 +57,12 @@ image_filter_grammar::image_filter_grammar() qi::_g_type _g; qi::_h_type _h; qi::_r1_type _r1; - qi::eps_type eps; - qi::char_type char_; qi::double_type double_; - qi::no_skip_type no_skip; using phoenix::push_back; using phoenix::construct; using phoenix::at_c; - start = -(filter % no_skip[*char_(", ")]) + + start = -(filter % *lit(',')) ; filter = @@ -101,11 +99,10 @@ image_filter_grammar::image_filter_grammar() color_to_alpha_filter(_val) ; - agg_blur_filter = lit("agg-stack-blur")[_a = 1, _b = 1] + agg_blur_filter = (lit("agg-stack-blur")[_a = 1, _b = 1] >> -( lit('(') >> -( radius_[_a = _1][_b = _1] - >> -(lit(',') >> radius_[_b = _1])) - >> lit(')')) - [push_back(_r1,construct(_a,_b))] + >> -(lit(',') >> radius_[_b = _1])) >> lit(')'))) + [push_back(_r1, construct(_a,_b))] ; scale_hsla_filter = lit("scale-hsla") diff --git a/include/mapnik/transform_expression_grammar_impl.hpp b/include/mapnik/transform_expression_grammar_impl.hpp index 7f5317e69..4b8c2b92a 100644 --- a/include/mapnik/transform_expression_grammar_impl.hpp +++ b/include/mapnik/transform_expression_grammar_impl.hpp @@ -45,7 +45,6 @@ transform_expression_grammar::transform_expression_grammar() qi::_3_type _3; qi::_6_type _6; qi::_val_type _val; - qi::char_type char_; qi::double_type double_; qi::lit_type lit; qi::no_case_type no_case; @@ -57,8 +56,7 @@ transform_expression_grammar::transform_expression_grammar() // the order provided. The individual transform definitions are // separated by whitespace and/or a comma. - qi::no_skip_type no_skip; - start = transform_ % no_skip[*char_(", ")] ; + start = transform_ % *lit(',') ; transform_ = matrix | translate | scale | rotate | skewX | skewY ; diff --git a/test/unit/imaging/image_filter.cpp b/test/unit/imaging/image_filter.cpp index f2805b068..4ee5b1a72 100644 --- a/test/unit/imaging/image_filter.cpp +++ b/test/unit/imaging/image_filter.cpp @@ -7,6 +7,9 @@ #include #include #include +// stl +#include +#include TEST_CASE("image filter") { @@ -389,6 +392,44 @@ SECTION("test colorize-alpha - two color with transparency") { } // END SECTION +SECTION("test parsing image-filters") { + + std::string str = ""; // empty string + std::vector filters; + CHECK(parse_image_filters(str, filters)); + CHECK(filters.size() == 0); + + std::array expected = {{ "emboss", + "emboss", + "blur", + "gray", + "edge-detect", + "sobel", + "sharpen", + "x-gradient", + "y-gradient", + "invert", + "color-blind-protanope", + "color-blind-deuteranope", + "color-blind-tritanope", + "agg-stack-blur(1,1)", + "agg-stack-blur(1,1)", + "agg-stack-blur(2,2)", + "agg-stack-blur(2,3)"}}; + + str += "emboss emboss() blur,gray ,edge-detect, sobel , , sharpen,,,x-gradient y-gradientinvert"; + str += "color-blind-protanope color-blind-deuteranope color-blind-tritanope agg-stack-blur,agg-stack-blur(),agg-stack-blur(2),agg-stack-blur(2,3)" ; + CHECK(parse_image_filters(str, filters)); + CHECK(filters.size() == expected.size()); + std::size_t count = 0; + for (auto const& filter : filters) + { + std::stringstream ss; + ss << filter; + CHECK (expected[count++] == ss.str()); + } +} + SECTION("test colorize-alpha - parsing correct input") { std::string s("colorize-alpha(#0000ff 0%, #00ff00 100%)"); From 53bb55eade19a19356e7b8d3bf7bf439ccdf6f22 Mon Sep 17 00:00:00 2001 From: Mickey Rose Date: Mon, 18 Jan 2016 18:20:50 +0100 Subject: [PATCH 5/8] rename expresssions_test.cpp, didn't pass spell check --- test/unit/core/{expresssions_test.cpp => expressions_test.cpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/unit/core/{expresssions_test.cpp => expressions_test.cpp} (100%) diff --git a/test/unit/core/expresssions_test.cpp b/test/unit/core/expressions_test.cpp similarity index 100% rename from test/unit/core/expresssions_test.cpp rename to test/unit/core/expressions_test.cpp From 5764d619f326911aa4885900d9a05f908822e644 Mon Sep 17 00:00:00 2001 From: Mickey Rose Date: Mon, 18 Jan 2016 19:53:26 +0100 Subject: [PATCH 6/8] expressions test: move expression strings into Catch calls, continue on failure --- test/catch_ext.hpp | 22 +++++ test/unit/core/expressions_test.cpp | 129 ++++++++++++---------------- 2 files changed, 78 insertions(+), 73 deletions(-) create mode 100644 test/catch_ext.hpp diff --git a/test/catch_ext.hpp b/test/catch_ext.hpp new file mode 100644 index 000000000..3168ecf43 --- /dev/null +++ b/test/catch_ext.hpp @@ -0,0 +1,22 @@ +#ifndef TEST_CATCH_EXT_HPP +#define TEST_CATCH_EXT_HPP + +#include "catch.hpp" + +#define TRY_CHECK( expr ) \ + try { \ + CHECK( expr ); \ + } \ + catch ( Catch::TestFailureException & ) { \ + /* thrown by CHECK after it catches and reports */ \ + /* an exception from expr => swallow this */ \ + } + +#define TRY_CHECK_FALSE( expr ) \ + try { \ + CHECK_FALSE( expr ); \ + } \ + catch ( Catch::TestFailureException & ) { \ + } + +#endif // TEST_CATCH_EXT_HPP diff --git a/test/unit/core/expressions_test.cpp b/test/unit/core/expressions_test.cpp index 309d9a068..75eba6217 100644 --- a/test/unit/core/expressions_test.cpp +++ b/test/unit/core/expressions_test.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch_ext.hpp" #include #include @@ -7,6 +7,8 @@ #include #include #include + +#include #include namespace { @@ -38,9 +40,23 @@ mapnik::value_type evaluate(Feature const& feature, Expression const& expr) return value; } +mapnik::value evaluate_string(mapnik::feature_ptr const& feature, std::string const& str) +{ + auto expr = mapnik::parse_expression(str); + return evaluate(*feature, *expr); } + +std::string parse_and_dump(std::string const& str) +{ + auto expr = mapnik::parse_expression(str); + return mapnik::to_expression_string(*expr); +} + +} // namespace + TEST_CASE("expressions") { + using namespace std::placeholders; using properties_type = std::vector > ; mapnik::transcoder tr("utf8"); @@ -52,115 +68,82 @@ TEST_CASE("expressions") { "null" , mapnik::value_null()}}; auto feature = make_test_feature(1, "POINT(100 200)", prop); + auto eval = std::bind(evaluate_string, feature, _1); + auto approx = Approx::custom().epsilon(1e-6); - auto expr = mapnik::parse_expression("[foo]='bar'"); - REQUIRE(evaluate(*feature, *expr) == true); + TRY_CHECK(eval(" [foo]='bar' ") == true); // primary expressions // null - expr = mapnik::parse_expression("null"); - REQUIRE(mapnik::to_expression_string(*expr) == "null"); + TRY_CHECK(parse_and_dump("null") == "null"); // boolean - expr = mapnik::parse_expression("true"); - REQUIRE(mapnik::to_expression_string(*expr) == "true"); - expr = mapnik::parse_expression("false"); - REQUIRE(mapnik::to_expression_string(*expr) == "false"); + TRY_CHECK(parse_and_dump("true") == "true"); + TRY_CHECK(parse_and_dump("false") == "false"); // floating point - expr = mapnik::parse_expression("3.14159"); - REQUIRE(mapnik::to_expression_string(*expr) == "3.14159"); + TRY_CHECK(parse_and_dump("3.14159") == "3.14159"); // integer - expr = mapnik::parse_expression("123"); - REQUIRE(mapnik::to_expression_string(*expr) == "123"); + TRY_CHECK(parse_and_dump("123") == "123"); // unicode - expr = mapnik::parse_expression("'single_quoted_string'"); - REQUIRE(mapnik::to_expression_string(*expr) == "'single_quoted_string'"); - expr = mapnik::parse_expression("\"double_quoted_string\""); - REQUIRE(mapnik::to_expression_string(*expr) == "'double_quoted_string'"); + TRY_CHECK(parse_and_dump("'single-quoted string'") == "'single-quoted string'"); + TRY_CHECK(parse_and_dump("\"double-quoted string\"") == "'double-quoted string'"); // floating point constants - expr = mapnik::parse_expression("pi"); - REQUIRE(mapnik::to_expression_string(*expr) == "3.14159"); - expr = mapnik::parse_expression("deg_to_rad"); - REQUIRE(mapnik::to_expression_string(*expr) == "0.0174533"); - expr = mapnik::parse_expression("rad_to_deg"); - REQUIRE(mapnik::to_expression_string(*expr) == "57.2958"); + TRY_CHECK(parse_and_dump("pi") == "3.14159"); + TRY_CHECK(parse_and_dump("deg_to_rad") == "0.0174533"); + TRY_CHECK(parse_and_dump("rad_to_deg") == "57.2958"); // unary functions // sin / cos - expr = mapnik::parse_expression("sin(0.25 * pi)/cos(0.25 * pi)"); - double value = evaluate(*feature, *expr).to_double(); - REQUIRE(std::fabs(value - 1.0) < 1e-6); + TRY_CHECK(eval(" sin(0.25 * pi) / cos(0.25 * pi) ").to_double() == approx(1.0)); // tan - auto expr2 = mapnik::parse_expression("tan(0.25 * pi)"); - double value2 = evaluate(*feature, *expr).to_double(); - REQUIRE(value == value2); + TRY_CHECK(eval(" tan(0.25 * pi) ").to_double() == approx(1.0)); // atan - expr = mapnik::parse_expression("rad_to_deg * atan(1.0)"); - REQUIRE(std::fabs(evaluate(*feature, *expr).to_double() - 45.0) < 1e-6); + TRY_CHECK(eval(" rad_to_deg * atan(1.0) ").to_double() == approx(45.0)); // exp - expr = mapnik::parse_expression("exp(0.0)"); - REQUIRE(evaluate(*feature, *expr).to_double() == 1.0); + TRY_CHECK(eval(" exp(0.0) ") == 1.0); // abs - expr = mapnik::parse_expression("abs(cos(-pi))"); - REQUIRE(evaluate(*feature, *expr).to_double() == 1.0); + TRY_CHECK(eval(" abs(cos(-pi)) ") == 1.0); // length (string) - expr = mapnik::parse_expression("length('1234567890')"); - REQUIRE(evaluate(*feature, *expr).to_int() == 10); + TRY_CHECK(eval(" length('1234567890') ").to_int() == 10); // binary functions // min - expr = mapnik::parse_expression("min(-0.01, 0.001)"); - REQUIRE(evaluate(*feature, *expr).to_double() == -0.01); + TRY_CHECK(eval(" min(-0.01, 0.001) ") == -0.01); // max - expr = mapnik::parse_expression("max(0.01, -0.1)"); - REQUIRE(evaluate(*feature, *expr).to_double() == 0.01); + TRY_CHECK(eval(" max(0.01, -0.1) ") == 0.01); // pow - expr = mapnik::parse_expression("pow(2, 32)"); - REQUIRE(evaluate(*feature, *expr).to_double() == 4294967296.0); + TRY_CHECK(eval(" pow(2, 32) ") == 4294967296.0); // geometry types - expr = mapnik::parse_expression("[mapnik::geometry_type] = point"); - REQUIRE(evaluate(*feature, *expr) == true); - expr = mapnik::parse_expression("[mapnik::geometry_type] <> linestring"); - REQUIRE(evaluate(*feature, *expr) == true); - expr = mapnik::parse_expression("[mapnik::geometry_type] != polygon"); - REQUIRE(evaluate(*feature, *expr) == true); - expr = mapnik::parse_expression("[mapnik::geometry_type] neq collection"); - REQUIRE(evaluate(*feature, *expr) == true); - expr = mapnik::parse_expression("[mapnik::geometry_type] eq collection"); - REQUIRE(evaluate(*feature, *expr) == false); + TRY_CHECK(eval(" [mapnik::geometry_type] = point ") == true); + TRY_CHECK(eval(" [mapnik::geometry_type] <> linestring ") == true); + TRY_CHECK(eval(" [mapnik::geometry_type] != polygon ") == true); + TRY_CHECK(eval(" [mapnik::geometry_type] neq collection ") == true); + TRY_CHECK(eval(" [mapnik::geometry_type] eq collection ") == false); //unary expression - expr = mapnik::parse_expression("-123.456"); - REQUIRE(evaluate(*feature, *expr).to_double() == -123.456); - expr = mapnik::parse_expression("+123.456"); - REQUIRE(evaluate(*feature, *expr).to_double() == 123.456); + TRY_CHECK(eval(" -123.456 ") == -123.456); + TRY_CHECK(eval(" +123.456 ") == 123.456); // multiplicative/additive - expr = mapnik::parse_expression("(2.0 * 2.0 + 3.0 * 3.0)/(2.0 * 2.0 - 3.0 * 3.0)"); - REQUIRE(evaluate(*feature, *expr).to_double() == -2.6); - expr2 = mapnik::parse_expression("(2.0 * 2.0 + 3.0 * 3.0)/((2.0 - 3.0) * (2.0 + 3.0))"); - REQUIRE(evaluate(*feature, *expr).to_double() == evaluate(*feature, *expr2).to_double()); + auto expr = mapnik::parse_expression("(2.0 * 2.0 + 3.0 * 3.0)/(2.0 * 2.0 - 3.0 * 3.0)"); + TRY_CHECK(evaluate(*feature, *expr) == -2.6); + auto expr2 = mapnik::parse_expression("(2.0 * 2.0 + 3.0 * 3.0)/((2.0 - 3.0) * (2.0 + 3.0))"); + TRY_CHECK(evaluate(*feature, *expr) == evaluate(*feature, *expr2)); // logical - expr = mapnik::parse_expression("[int] = 123 and [double] = 1.23456 && [bool] = true and [null] = null && [foo] = 'bar'"); - REQUIRE(evaluate(*feature, *expr) == true); - expr = mapnik::parse_expression("[int] = 456 or [foo].match('foo') || length([foo]) = 3"); - REQUIRE(evaluate(*feature, *expr) == true); + TRY_CHECK(eval(" [int] = 123 and [double] = 1.23456 && [bool] = true and [null] = null && [foo] = 'bar' ") == true); + TRY_CHECK(eval(" [int] = 456 or [foo].match('foo') || length([foo]) = 3 ") == true); // relational - expr = mapnik::parse_expression("[int] > 100 and [int] gt 100.0 and [double] < 2 and [double] lt 2.0"); - REQUIRE(evaluate(*feature, *expr) == true); - expr = mapnik::parse_expression("[int] >= 123 and [int] ge 123.0 and [double] <= 1.23456 and [double] le 1.23456"); - REQUIRE(evaluate(*feature, *expr) == true); + TRY_CHECK(eval(" [int] > 100 and [int] gt 100.0 and [double] < 2 and [double] lt 2.0 ") == true); + TRY_CHECK(eval(" [int] >= 123 and [int] ge 123.0 and [double] <= 1.23456 and [double] le 1.23456 ") == true); // regex // replace - expr = mapnik::parse_expression("[foo].replace('(\\B)|( )','$1 ')"); - REQUIRE(evaluate(*feature, *expr) == tr.transcode("b a r")); + TRY_CHECK(eval(" [foo].replace('(\\B)|( )','$1 ') ") == tr.transcode("b a r")); // match - expr = mapnik::parse_expression("[name].match('Québec')"); - REQUIRE(evaluate(*feature, *expr) == true); + TRY_CHECK(eval(" [name].match('Québec') ") == true); } From ed8c8df73855edffd7676292dd69e9d4d6b6a358 Mon Sep 17 00:00:00 2001 From: Mickey Rose Date: Sat, 6 Feb 2016 18:39:56 +0100 Subject: [PATCH 7/8] expression_grammar: use one symbol table for all constants --- include/mapnik/expression_grammar.hpp | 41 +--------------------- include/mapnik/expression_grammar_impl.hpp | 24 +++++++++---- 2 files changed, 19 insertions(+), 46 deletions(-) diff --git a/include/mapnik/expression_grammar.hpp b/include/mapnik/expression_grammar.hpp index ff9423ea3..ea65425a0 100644 --- a/include/mapnik/expression_grammar.hpp +++ b/include/mapnik/expression_grammar.hpp @@ -107,43 +107,6 @@ struct regex_replace_impl mapnik::transcoder const& tr_; }; -struct geometry_types : qi::symbols -{ - geometry_types() - { - add - ("point", 1) - ("linestring", 2) - ("polygon",3) - ("collection",4) - ; - } -}; - -struct boolean_constants : qi::symbols -{ - boolean_constants() - { - add - ("true", true) - ("false", false) - ; - } -}; - -struct floating_point_constants : qi::symbols -{ - floating_point_constants() - { - add - ("pi", 3.1415926535897932384626433832795) - ("deg_to_rad",0.017453292519943295769236907684886) - ("rad_to_deg",57.295779513082320876798154814105) - ; - } -}; - - template struct integer_parser { @@ -200,9 +163,7 @@ struct expression_grammar : qi::grammar qi::symbols unesc_char; qi::rule quote_char; - geometry_types geom_type; - boolean_constants bool_const; - floating_point_constants float_const; + qi::symbols constant; unary_function_types unary_func_type; binary_function_types binary_func_type; diff --git a/include/mapnik/expression_grammar_impl.hpp b/include/mapnik/expression_grammar_impl.hpp index 9c82cb8c5..c2c23e050 100644 --- a/include/mapnik/expression_grammar_impl.hpp +++ b/include/mapnik/expression_grammar_impl.hpp @@ -103,6 +103,20 @@ expression_grammar::expression_grammar(std::string const& encoding) standard_wide::char_type char_; standard_wide::no_case_type no_case; using boost::phoenix::construct; + using boost::phoenix::if_else; + + constant.add + ("null", mapnik::value_null()) + ("false", mapnik::value_bool(false)) + ("true", mapnik::value_bool(true)) + ("point", mapnik::value_integer(1)) + ("linestring", mapnik::value_integer(2)) + ("polygon", mapnik::value_integer(3)) + ("collection", mapnik::value_integer(4)) + ("pi", mapnik::value_double(3.1415926535897932384626433832795)) + ("deg_to_rad", mapnik::value_double(0.017453292519943295769236907684886)) + ("rad_to_deg", mapnik::value_double(57.295779513082320876798154814105)) + ; expr = logical_expr.alias(); @@ -180,13 +194,11 @@ expression_grammar::expression_grammar(std::string const& encoding) primary_expr = strict_double [_val = _1] | int__[_val = _1] - | no_case[bool_const][_val = _1] - | no_case[lit("null")] [_val = value_null() ] - | no_case[geom_type][_val = _1 ] - | no_case[float_const] [_val = _1 ] + | no_case[constant] [_val = _1] | quoted_ustring [_val = unicode_(_1)] - | lit("[mapnik::geometry_type]")[_val = construct()] - | attr [_val = construct( _1 ) ] + | attr [if_else(_1 == "mapnik::geometry_type", + _val = construct(), + _val = construct(_1))] | global_attr [_val = construct( _1 )] | lit("not") >> expr [_val = !_1] | unary_function_expr [_val = _1] From 8da250a0eea3c7bdd79a11575fe902fe3d6f156a Mon Sep 17 00:00:00 2001 From: Mickey Rose Date: Sun, 7 Feb 2016 14:22:44 +0100 Subject: [PATCH 8/8] show build status badges for master (svg) - Travis badge URL was .png - AppVeyor badge used latest build (any branch) - [skip ci] --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 18268deb6..b5ebf6a3e 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ _/ _/ _/_/_/ _/_/_/ _/ _/ _/ _/ _/ _/ ``` -[![Build Status Linux](https://secure.travis-ci.org/mapnik/mapnik.png)](http://travis-ci.org/mapnik/mapnik) -[![Build status Windows](https://ci.appveyor.com/api/projects/status/hc9l7okdjtucfqqn?svg=true)](https://ci.appveyor.com/project/Mapbox/mapnik) +[![Build Status Linux](https://api.travis-ci.org/mapnik/mapnik.svg?branch=master)](http://travis-ci.org/mapnik/mapnik) +[![Build Status Windows](https://ci.appveyor.com/api/projects/status/hc9l7okdjtucfqqn?branch=master&svg=true)](https://ci.appveyor.com/project/Mapbox/mapnik) [![Coverage Status](https://coveralls.io/repos/mapnik/mapnik/badge.svg?branch=master&service=github)](https://coveralls.io/github/mapnik/mapnik?branch=master) Mapnik is an open source toolkit for developing mapping applications. At the core is a C++ shared library providing algorithms and patterns for spatial data access and visualization.