From 0a126a3765754a995a795c44d64e13d29140b624 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 14 Jul 2015 22:54:32 -0700 Subject: [PATCH 01/24] attemp to fix #2971 --- include/mapnik/text/glyph_positions.hpp | 3 +-- src/agg/process_group_symbolizer.cpp | 1 + src/agg/process_shield_symbolizer.cpp | 1 + src/agg/process_text_symbolizer.cpp | 1 + src/cairo/process_group_symbolizer.cpp | 1 + src/cairo/process_text_symbolizer.cpp | 1 + src/grid/process_group_symbolizer.cpp | 1 + src/grid/process_shield_symbolizer.cpp | 1 + src/grid/process_text_symbolizer.cpp | 1 + 9 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/mapnik/text/glyph_positions.hpp b/include/mapnik/text/glyph_positions.hpp index 604de8c7c..e956edda8 100644 --- a/include/mapnik/text/glyph_positions.hpp +++ b/include/mapnik/text/glyph_positions.hpp @@ -26,6 +26,7 @@ #include #include #include +#include // agg #include "agg_trans_affine.h" @@ -37,8 +38,6 @@ namespace mapnik { -struct glyph_info; - struct glyph_position { glyph_position(glyph_info const& _glyph, pixel_position const& _pos, rotation const& _rot) diff --git a/src/agg/process_group_symbolizer.cpp b/src/agg/process_group_symbolizer.cpp index 68c54f2c3..f2c8adf48 100644 --- a/src/agg/process_group_symbolizer.cpp +++ b/src/agg/process_group_symbolizer.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/src/agg/process_shield_symbolizer.cpp b/src/agg/process_shield_symbolizer.cpp index 67fe8de0d..3d28eff60 100644 --- a/src/agg/process_shield_symbolizer.cpp +++ b/src/agg/process_shield_symbolizer.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include namespace mapnik { diff --git a/src/agg/process_text_symbolizer.cpp b/src/agg/process_text_symbolizer.cpp index 078a7abaa..b3794bcf5 100644 --- a/src/agg/process_text_symbolizer.cpp +++ b/src/agg/process_text_symbolizer.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include namespace mapnik { diff --git a/src/cairo/process_group_symbolizer.cpp b/src/cairo/process_group_symbolizer.cpp index d32afcf67..a2dc4abbe 100644 --- a/src/cairo/process_group_symbolizer.cpp +++ b/src/cairo/process_group_symbolizer.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/src/cairo/process_text_symbolizer.cpp b/src/cairo/process_text_symbolizer.cpp index 06b56cb2d..2d34e213c 100644 --- a/src/cairo/process_text_symbolizer.cpp +++ b/src/cairo/process_text_symbolizer.cpp @@ -27,6 +27,7 @@ #include #include #include +#include namespace mapnik { diff --git a/src/grid/process_group_symbolizer.cpp b/src/grid/process_group_symbolizer.cpp index a672f6b8f..f73118969 100644 --- a/src/grid/process_group_symbolizer.cpp +++ b/src/grid/process_group_symbolizer.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/src/grid/process_shield_symbolizer.cpp b/src/grid/process_shield_symbolizer.cpp index 781989384..50bc8209f 100644 --- a/src/grid/process_shield_symbolizer.cpp +++ b/src/grid/process_shield_symbolizer.cpp @@ -31,6 +31,7 @@ #include #include #include +#include // agg #include "agg_trans_affine.h" diff --git a/src/grid/process_text_symbolizer.cpp b/src/grid/process_text_symbolizer.cpp index 3df4ad24f..7fe0ff377 100644 --- a/src/grid/process_text_symbolizer.cpp +++ b/src/grid/process_text_symbolizer.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include namespace mapnik { From bb16cf90ff09488e79af18a8005f965f498af767 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 17 Jul 2015 07:49:16 -0700 Subject: [PATCH 02/24] make text_itemizer noncopyable --- include/mapnik/text/itemizer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mapnik/text/itemizer.hpp b/include/mapnik/text/itemizer.hpp index 4f11bba57..b8589448d 100644 --- a/include/mapnik/text/itemizer.hpp +++ b/include/mapnik/text/itemizer.hpp @@ -72,7 +72,7 @@ struct MAPNIK_DECL text_item : util::noncopyable // - format // - script (http://en.wikipedia.org/wiki/Scripts_in_Unicode) -class MAPNIK_DECL text_itemizer +class MAPNIK_DECL text_itemizer : util::noncopyable { public: text_itemizer(); From 25af931f58c9c33b1bbb4180b434674ad6631f69 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 17 Jul 2015 07:49:41 -0700 Subject: [PATCH 03/24] don't forward declare glyph_info in text_line.hpp --- include/mapnik/text/text_line.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/mapnik/text/text_line.hpp b/include/mapnik/text/text_line.hpp index a00fb79cf..cf47026df 100644 --- a/include/mapnik/text/text_line.hpp +++ b/include/mapnik/text/text_line.hpp @@ -26,12 +26,11 @@ #include #include #include +#include namespace mapnik { -struct glyph_info; - // This class stores all glyphs of a line in left to right order. // It can be used for rendering but no text processing (like line breaking) // should be done! @@ -98,6 +97,6 @@ private: unsigned space_count_; }; -} //namespace mapnik +} // namespace mapnik #endif // MAPNIK_TEXT_LINE_HPP From 43dcf35a93138b5a072930a8677da87fbda543b4 Mon Sep 17 00:00:00 2001 From: Jiri Drbalek Date: Mon, 20 Jul 2015 15:37:05 +0000 Subject: [PATCH 04/24] do not store out of extent collision boxes (fixes #2963) --- include/mapnik/label_collision_detector.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/mapnik/label_collision_detector.hpp b/include/mapnik/label_collision_detector.hpp index 6dce9ff2c..74a76be7f 100644 --- a/include/mapnik/label_collision_detector.hpp +++ b/include/mapnik/label_collision_detector.hpp @@ -212,12 +212,18 @@ public: void insert(box2d const& box) { - tree_.insert(label(box), box); + if (tree_.extent().intersects(box)) + { + tree_.insert(label(box), box); + } } void insert(box2d const& box, mapnik::value_unicode_string const& text) { - tree_.insert(label(box, text), box); + if (tree_.extent().intersects(box)) + { + tree_.insert(label(box, text), box); + } } void clear() From 8faff70620f5bada088cec13252cd3a9f3385636 Mon Sep 17 00:00:00 2001 From: Jiri Drbalek Date: Tue, 21 Jul 2015 12:54:16 +0000 Subject: [PATCH 05/24] fix text-minimum-path-length --- src/text/symbolizer_helpers.cpp | 34 +++++---------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/src/text/symbolizer_helpers.cpp b/src/text/symbolizer_helpers.cpp index 99c7c0356..64fdd7847 100644 --- a/src/text/symbolizer_helpers.cpp +++ b/src/text/symbolizer_helpers.cpp @@ -79,11 +79,10 @@ struct split_multi_geometries { using container_type = T; split_multi_geometries(container_type & cont, view_transform const& t, - proj_transform const& prj_trans, double minimum_path_length) + proj_transform const& prj_trans) : cont_(cont), t_(t), - prj_trans_(prj_trans), - minimum_path_length_(minimum_path_length) {} + prj_trans_(prj_trans) { } void operator() (geometry::geometry_empty const&) const {} void operator() (geometry::multi_point const& multi_pt) const @@ -95,18 +94,7 @@ struct split_multi_geometries } void operator() (geometry::line_string const& line) const { - if (minimum_path_length_ > 0) - { - box2d bbox = t_.forward(geometry::envelope(line), prj_trans_); - if (bbox.width() >= minimum_path_length_) - { - cont_.push_back(base_symbolizer_helper::geometry_cref(std::cref(line))); - } - } - else - { - cont_.push_back(base_symbolizer_helper::geometry_cref(std::cref(line))); - } + cont_.push_back(base_symbolizer_helper::geometry_cref(std::cref(line))); } void operator() (geometry::multi_line_string const& multi_line) const @@ -119,18 +107,7 @@ struct split_multi_geometries void operator() (geometry::polygon const& poly) const { - if (minimum_path_length_ > 0) - { - box2d bbox = t_.forward(geometry::envelope(poly), prj_trans_); - if (bbox.width() >= minimum_path_length_) - { - cont_.push_back(base_symbolizer_helper::geometry_cref(std::cref(poly))); - } - } - else - { - cont_.push_back(base_symbolizer_helper::geometry_cref(std::cref(poly))); - } + cont_.push_back(base_symbolizer_helper::geometry_cref(std::cref(poly))); } void operator() (geometry::multi_polygon const& multi_poly) const @@ -158,7 +135,6 @@ struct split_multi_geometries container_type & cont_; view_transform const& t_; proj_transform const& prj_trans_; - double minimum_path_length_; }; } // ns detail @@ -210,7 +186,7 @@ void base_symbolizer_helper::initialize_geometries() const double minimum_path_length = text_props_->minimum_path_length; auto const& geom = feature_.get_geometry(); util::apply_visitor(detail::split_multi_geometries - (geometries_to_process_, t_, prj_trans_, minimum_path_length ), geom); + (geometries_to_process_, t_, prj_trans_), geom); if (!geometries_to_process_.empty()) { auto type = geometry::geometry_type(geom); From ba8d51e0294d6c72cd510eeead29a02f21e505f0 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 14:57:57 -0700 Subject: [PATCH 06/24] include fixups --- include/mapnik/text/placement_finder.hpp | 1 - include/mapnik/text/placement_finder_impl.hpp | 18 +++++++----------- include/mapnik/text/symbolizer_helpers.hpp | 5 ++++- src/agg/process_line_pattern_symbolizer.cpp | 1 - src/agg/process_markers_symbolizer.cpp | 1 - src/group/group_symbolizer_helper.cpp | 3 --- src/text/placement_finder.cpp | 4 +--- src/text/symbolizer_helpers.cpp | 2 -- 8 files changed, 12 insertions(+), 23 deletions(-) diff --git a/include/mapnik/text/placement_finder.hpp b/include/mapnik/text/placement_finder.hpp index f2bd36db3..0460b2c52 100644 --- a/include/mapnik/text/placement_finder.hpp +++ b/include/mapnik/text/placement_finder.hpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/include/mapnik/text/placement_finder_impl.hpp b/include/mapnik/text/placement_finder_impl.hpp index 739238924..1b8f84147 100644 --- a/include/mapnik/text/placement_finder_impl.hpp +++ b/include/mapnik/text/placement_finder_impl.hpp @@ -19,23 +19,19 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -//mapnik -#include -#include -#include -#include + +// mapnik +//#include +//#include #include #include #include -#include +//#include #include #include +#include -// agg -#include "agg_conv_clip_polyline.h" - -// stl -#include +#include namespace mapnik { diff --git a/include/mapnik/text/symbolizer_helpers.hpp b/include/mapnik/text/symbolizer_helpers.hpp index 714d566ba..8a44bddfc 100644 --- a/include/mapnik/text/symbolizer_helpers.hpp +++ b/include/mapnik/text/symbolizer_helpers.hpp @@ -22,10 +22,13 @@ #ifndef SYMBOLIZER_HELPERS_HPP #define SYMBOLIZER_HELPERS_HPP -//mapnik +// mapnik #include +#include #include #include +#include +#include namespace mapnik { diff --git a/src/agg/process_line_pattern_symbolizer.cpp b/src/agg/process_line_pattern_symbolizer.cpp index 7cdd16648..a6be6b154 100644 --- a/src/agg/process_line_pattern_symbolizer.cpp +++ b/src/agg/process_line_pattern_symbolizer.cpp @@ -50,7 +50,6 @@ #include "agg_span_allocator.h" #include "agg_span_pattern_rgba.h" #include "agg_renderer_outline_image.h" -#include "agg_conv_clip_polyline.h" namespace mapnik { diff --git a/src/agg/process_markers_symbolizer.cpp b/src/agg/process_markers_symbolizer.cpp index ab06ed30c..cb9428260 100644 --- a/src/agg/process_markers_symbolizer.cpp +++ b/src/agg/process_markers_symbolizer.cpp @@ -50,7 +50,6 @@ #include "agg_rasterizer_scanline_aa.h" #include "agg_scanline_u.h" #include "agg_path_storage.h" -#include "agg_conv_clip_polyline.h" #include "agg_conv_transform.h" diff --git a/src/group/group_symbolizer_helper.cpp b/src/group/group_symbolizer_helper.cpp index a8e453a69..2ba70ff9b 100644 --- a/src/group/group_symbolizer_helper.cpp +++ b/src/group/group_symbolizer_helper.cpp @@ -34,9 +34,6 @@ #include #include -//agg -#include "agg_conv_clip_polyline.h" - namespace mapnik { namespace detail { template diff --git a/src/text/placement_finder.cpp b/src/text/placement_finder.cpp index 7c09e56f2..53dda7da7 100644 --- a/src/text/placement_finder.cpp +++ b/src/text/placement_finder.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -32,9 +33,6 @@ #include #include -// agg -#include "agg_conv_clip_polyline.h" - // stl #include diff --git a/src/text/symbolizer_helpers.cpp b/src/text/symbolizer_helpers.cpp index 99c7c0356..66212f88b 100644 --- a/src/text/symbolizer_helpers.cpp +++ b/src/text/symbolizer_helpers.cpp @@ -41,8 +41,6 @@ #include #include -//agg -#include "agg_conv_clip_polyline.h" namespace mapnik { namespace detail { From e82de0109dcd4f48ab9a81e831c257a615ecea30 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 15:35:00 -0700 Subject: [PATCH 07/24] centralize plugin registration for unit tests --- test/unit/core/copy_move_test.cpp | 1 - test/unit/core/exceptions_test.cpp | 2 -- test/unit/datasource/geojson.cpp | 7 ++++--- test/unit/imaging/image_painted_test.cpp | 2 -- test/unit/run.cpp | 4 ++++ 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/unit/core/copy_move_test.cpp b/test/unit/core/copy_move_test.cpp index 690537920..a219178a9 100644 --- a/test/unit/core/copy_move_test.cpp +++ b/test/unit/core/copy_move_test.cpp @@ -23,7 +23,6 @@ SECTION("layers") { std::string shape_plugin("./plugins/input/shape.input"); if (mapnik::util::exists(shape_plugin)) { - mapnik::datasource_cache::instance().register_datasources("plugins/input/shape.input"); mapnik::parameters p; p["type"]="shape"; p["file"]="demo/data/boundaries"; diff --git a/test/unit/core/exceptions_test.cpp b/test/unit/core/exceptions_test.cpp index 332460082..46abcce55 100644 --- a/test/unit/core/exceptions_test.cpp +++ b/test/unit/core/exceptions_test.cpp @@ -62,7 +62,6 @@ SECTION("handling") { std::string csv_plugin("./plugins/input/csv.input"); if (mapnik::util::exists(csv_plugin)) { try { - mapnik::datasource_cache::instance().register_datasource(csv_plugin); mapnik::parameters p; p["type"]="csv"; p["inline"]="x,y\n0,0"; @@ -88,7 +87,6 @@ SECTION("handling") { std::string shape_plugin("./plugins/input/shape.input"); if (mapnik::util::exists(shape_plugin)) { try { - mapnik::datasource_cache::instance().register_datasource(shape_plugin); mapnik::parameters p2; p2["type"]="shape"; p2["file"]="foo"; diff --git a/test/unit/datasource/geojson.cpp b/test/unit/datasource/geojson.cpp index 4fe4f0792..9bcacca95 100644 --- a/test/unit/datasource/geojson.cpp +++ b/test/unit/datasource/geojson.cpp @@ -33,7 +33,6 @@ TEST_CASE("geojson") { std::string geojson_plugin("./plugins/input/geojson.input"); if (mapnik::util::exists(geojson_plugin)) { - mapnik::datasource_cache::instance().register_datasources("plugins/input/geojson.input"); SECTION("json feature cache-feature=\"true\"") { // Create datasource @@ -50,6 +49,7 @@ TEST_CASE("geojson") { query.add_property_name(field.get_name()); } auto features = ds->features(query); + REQUIRE(features != nullptr); auto feature = features->next(); REQUIRE(feature != nullptr); } @@ -69,11 +69,11 @@ TEST_CASE("geojson") { query.add_property_name(field.get_name()); } auto features = ds->features(query); + REQUIRE(features != nullptr); auto feature = features->next(); REQUIRE(feature != nullptr); } - mapnik::datasource_cache::instance().register_datasources("plugins/input/geojson.input"); SECTION("json extra properties cache-feature=\"true\"") { // Create datasource @@ -90,12 +90,12 @@ TEST_CASE("geojson") { query.add_property_name(field.get_name()); } auto features = ds->features(query); + REQUIRE(features != nullptr); auto feature = features->next(); REQUIRE(feature != nullptr); REQUIRE(feature->envelope() == mapnik::box2d(123,456,123,456)); } - mapnik::datasource_cache::instance().register_datasources("plugins/input/geojson.input"); SECTION("json extra properties cache-feature=\"false\"") { // Create datasource @@ -112,6 +112,7 @@ TEST_CASE("geojson") { query.add_property_name(field.get_name()); } auto features = ds->features(query); + REQUIRE(features != nullptr); auto feature = features->next(); REQUIRE(feature != nullptr); REQUIRE(feature->envelope() == mapnik::box2d(123,456,123,456)); diff --git a/test/unit/imaging/image_painted_test.cpp b/test/unit/imaging/image_painted_test.cpp index a1fbbc979..5d0b403f7 100644 --- a/test/unit/imaging/image_painted_test.cpp +++ b/test/unit/imaging/image_painted_test.cpp @@ -21,8 +21,6 @@ SECTION("painting") { std::string csv_plugin("./plugins/input/csv.input"); if (mapnik::util::exists(csv_plugin)) { - datasource_cache::instance().register_datasources(csv_plugin); - Map m(256, 256); feature_type_style lines_style; diff --git a/test/unit/run.cpp b/test/unit/run.cpp index 15ad0991a..8ae4ddc73 100644 --- a/test/unit/run.cpp +++ b/test/unit/run.cpp @@ -1,10 +1,14 @@ #define CATCH_CONFIG_RUNNER #include "catch.hpp" +#include + #include "cleanup.hpp" // run_cleanup() int main (int argc, char* const argv[]) { + mapnik::datasource_cache::instance().register_datasources("plugins/input/"); + int result = Catch::Session().run( argc, argv ); testing::run_cleanup(); From 8efaacd923bb145e2730359aed267c617d4adf1e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 15:53:09 -0700 Subject: [PATCH 08/24] add recent work to changelog #2991, #2985, #2983 [skip ci] --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfad888ba..3501e433e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ For a complete change history, see the git log. ## Future +- Fixed handling of out of range `rx` and `ry` in SVG `rect` (#2991) +- Fixed reporting of envelope from `mapnik::memory_datasource` when new features are added (#2985) +- Fixed parsing of GeoJSON when unknown properties encountered at `FeatureCollection` level (#2983) - Fixed parsing of GeoJSON when properties contained `{}` (#2964) - Fixed potential hang due to invalid use of `line-geometry-transform` (6d6cb15) From 8ebb9db43193074d2b7927bf69c872a5d4c6dcd9 Mon Sep 17 00:00:00 2001 From: artemp Date: Tue, 21 Jul 2015 10:25:19 +0200 Subject: [PATCH 09/24] add `xml:id` support ( ref #2989 ) --- src/svg/svg_parser.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/svg/svg_parser.cpp b/src/svg/svg_parser.cpp index a96fb9a89..548ccd294 100644 --- a/src/svg/svg_parser.cpp +++ b/src/svg/svg_parser.cpp @@ -489,7 +489,8 @@ void parse_path(svg_parser & parser, xmlTextReaderPtr reader) { xmlFree(value); xmlChar *id_value; - id_value = xmlTextReaderGetAttribute(reader, BAD_CAST "id"); + id_value = xmlTextReaderGetAttribute(reader, BAD_CAST "xml:id"); + if (!id_value) id_value = xmlTextReaderGetAttribute(reader, BAD_CAST "id"); if (id_value) { std::string id_string((const char *) id_value); @@ -859,7 +860,9 @@ bool parse_common_gradient(svg_parser & parser, xmlTextReaderPtr reader) xmlChar *value; std::string id; - value = xmlTextReaderGetAttribute(reader, BAD_CAST "id"); + value = xmlTextReaderGetAttribute(reader, BAD_CAST "xml:id"); + if (!value) value = xmlTextReaderGetAttribute(reader, BAD_CAST "id"); + if (value) { // start a new gradient From 79bfe8b2f04d336720e7740e4801ddccebc59823 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 15:56:14 -0700 Subject: [PATCH 10/24] Add #2989 to changelog [skip ci] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3501e433e..f04b8619c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ For a complete change history, see the git log. ## Future +- Fixed handling of `xml:id` in SVG parsing (#2989) - Fixed handling of out of range `rx` and `ry` in SVG `rect` (#2991) - Fixed reporting of envelope from `mapnik::memory_datasource` when new features are added (#2985) - Fixed parsing of GeoJSON when unknown properties encountered at `FeatureCollection` level (#2983) From 6f61c0e6c452f9a409317085d154a4a9dd9153e2 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 16:21:31 -0700 Subject: [PATCH 11/24] fix building both postgis and pgraster plugins together - closes #2986 --- SConstruct | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SConstruct b/SConstruct index 488431df4..9f3c0f4a9 100644 --- a/SConstruct +++ b/SConstruct @@ -1897,6 +1897,8 @@ if not HELP_REQUESTED: # Build the requested and able-to-be-compiled input plug-ins GDAL_BUILT = False OGR_BUILT = False + POSTGIS_BUILT = False + PGRASTER_BUILT = False for plugin in env['PLUGINS']: if env['PLUGIN_LINKING'] == 'static' or plugin not in env['REQUESTED_PLUGINS']: if os.path.exists('plugins/input/%s.input' % plugin): @@ -1906,11 +1908,17 @@ if not HELP_REQUESTED: if details['lib'] in env['LIBS']: if env['PLUGIN_LINKING'] == 'shared': SConscript('plugins/input/%s/build.py' % plugin) + # hack to avoid breaking on plugins with the same dep if plugin == 'ogr': OGR_BUILT = True if plugin == 'gdal': GDAL_BUILT = True + if plugin == 'postgis': POSTGIS_BUILT = True + if plugin == 'pgraster': PGRASTER_BUILT = True if plugin == 'ogr' or plugin == 'gdal': if GDAL_BUILT and OGR_BUILT: env['LIBS'].remove(details['lib']) + elif plugin == 'postgis' or plugin == 'pgraster': + if POSTGIS_BUILT and PGRASTER_BUILT: + env['LIBS'].remove(details['lib']) else: env['LIBS'].remove(details['lib']) elif not details['lib']: From a5db12123112adde1fca3bb7db79bdbb6eadf663 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 16:45:22 -0700 Subject: [PATCH 12/24] followup to #2990 [skip ci] --- src/text/symbolizer_helpers.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/text/symbolizer_helpers.cpp b/src/text/symbolizer_helpers.cpp index 3570d80de..860359af6 100644 --- a/src/text/symbolizer_helpers.cpp +++ b/src/text/symbolizer_helpers.cpp @@ -181,7 +181,6 @@ struct largest_bbox_first void base_symbolizer_helper::initialize_geometries() const { - double minimum_path_length = text_props_->minimum_path_length; auto const& geom = feature_.get_geometry(); util::apply_visitor(detail::split_multi_geometries (geometries_to_process_, t_, prj_trans_), geom); From c7384e781c0db2e26cd406ddc0029f94a415c8f1 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 17:08:01 -0700 Subject: [PATCH 13/24] be explicit about pointing at master of test-data-visual --- .gitmodules | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitmodules b/.gitmodules index d0ae1390c..d2185cdfa 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,4 @@ [submodule "test/data-visual"] path = test/data-visual url = https://github.com/mapnik/test-data-visual.git + branch = master From c50f72764fb451315b30e0bb0b359693799280b0 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 17:09:46 -0700 Subject: [PATCH 14/24] update tests + add #2990 to changelog --- CHANGELOG.md | 1 + test/data-visual | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f04b8619c..a6e34c837 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ For a complete change history, see the git log. ## Future +- Fixed rendering behavior for `text-minimum-path-length` which regressed in 3.0.0 (#2990) - Fixed handling of `xml:id` in SVG parsing (#2989) - Fixed handling of out of range `rx` and `ry` in SVG `rect` (#2991) - Fixed reporting of envelope from `mapnik::memory_datasource` when new features are added (#2985) diff --git a/test/data-visual b/test/data-visual index 80c744348..31a2dd518 160000 --- a/test/data-visual +++ b/test/data-visual @@ -1 +1 @@ -Subproject commit 80c744348de8cb03a519e451129a243610e55f52 +Subproject commit 31a2dd518ab3776e8cfe6cbbf75258f57c44b36e From 0e8887171dfa8ac7a7d9ef2dd7a8df177110b4a7 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 17:26:59 -0700 Subject: [PATCH 15/24] update visual tests after #2988 - https://github.com/mapnik/test-data-visual/commit/e3d79ed493485afbb5c79cd90913c8db488561b6 --- test/data-visual | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/data-visual b/test/data-visual index 31a2dd518..e3d79ed49 160000 --- a/test/data-visual +++ b/test/data-visual @@ -1 +1 @@ -Subproject commit 31a2dd518ab3776e8cfe6cbbf75258f57c44b36e +Subproject commit e3d79ed493485afbb5c79cd90913c8db488561b6 From 47c3139371906ec7ea0778420a735f60625f703c Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 17:29:18 -0700 Subject: [PATCH 16/24] Add #2963 to changelog [skip ci] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6e34c837..dcf9251f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ For a complete change history, see the git log. ## Future +- Fixed text placement performance after #2949 (#2963) - Fixed rendering behavior for `text-minimum-path-length` which regressed in 3.0.0 (#2990) - Fixed handling of `xml:id` in SVG parsing (#2989) - Fixed handling of out of range `rx` and `ry` in SVG `rect` (#2991) From 411486eaf3b54ece9fc353fc4940300b73e9e50d Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 17:38:36 -0700 Subject: [PATCH 17/24] ignore warnings for karma --- include/mapnik/json/geometry_generator_grammar_impl.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/mapnik/json/geometry_generator_grammar_impl.hpp b/include/mapnik/json/geometry_generator_grammar_impl.hpp index c6968cfc0..f94498065 100644 --- a/include/mapnik/json/geometry_generator_grammar_impl.hpp +++ b/include/mapnik/json/geometry_generator_grammar_impl.hpp @@ -23,13 +23,21 @@ // mapnik #include #include +#include // boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wshadow" +#pragma GCC diagnostic ignored "-Wsign-conversion" +#pragma GCC diagnostic ignored "-Wconversion" #include #include #include #include #include +#pragma GCC diagnostic pop namespace mapnik { namespace json { From 4e2890bb1844ecf40ca22cc2867dc69df7a5f593 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 17:41:10 -0700 Subject: [PATCH 18/24] iwyu for spirit_transform_attribute.hpp - closes #2993 --- include/mapnik/util/spirit_transform_attribute.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/mapnik/util/spirit_transform_attribute.hpp b/include/mapnik/util/spirit_transform_attribute.hpp index 1c0bdac54..e924fd822 100644 --- a/include/mapnik/util/spirit_transform_attribute.hpp +++ b/include/mapnik/util/spirit_transform_attribute.hpp @@ -24,6 +24,20 @@ #define MAPNIK_UTIL_SPIRIT_TRANSFORM_ATTRIBUTE_HPP #include +#include + +#include +#include + +// boost +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wshadow" +#pragma GCC diagnostic ignored "-Wsign-conversion" +#pragma GCC diagnostic ignored "-Wconversion" +#include +#pragma GCC diagnostic pop namespace boost { namespace spirit { namespace traits { From 28f6f4d63bdd997018d041c67d5cea44e2a62b9e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 18:30:26 -0700 Subject: [PATCH 19/24] setting up for mapnik v3.0.1 release --- include/mapnik/version.hpp | 4 ++-- localize.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/mapnik/version.hpp b/include/mapnik/version.hpp index 47a200e8f..cbba22f2c 100644 --- a/include/mapnik/version.hpp +++ b/include/mapnik/version.hpp @@ -27,9 +27,9 @@ #define MAPNIK_MAJOR_VERSION 3 #define MAPNIK_MINOR_VERSION 0 -#define MAPNIK_PATCH_VERSION 0 +#define MAPNIK_PATCH_VERSION 1 -// translates to 300000 +// translates to 300001 #define MAPNIK_VERSION (MAPNIK_MAJOR_VERSION*100000) + (MAPNIK_MINOR_VERSION*100) + (MAPNIK_PATCH_VERSION) #ifndef MAPNIK_STRINGIFY diff --git a/localize.sh b/localize.sh index ee62e5987..31c6a6ea5 100755 --- a/localize.sh +++ b/localize.sh @@ -8,6 +8,7 @@ else fi export PATH=$(pwd)/utils/nik2img/:${PATH} +export PATH=$(pwd)/utils/mapnik-config/:${PATH} # mapnik-settings.env is an optional file to store # environment variables that should be used before From 3f26e7a4b051143311c017a8a41bb45bc2510575 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 18:42:09 -0700 Subject: [PATCH 20/24] update CHANGELOG for mapnik v3.0.1 release [skip ci] --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcf9251f5..a8d10ff78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,15 @@ Developers: Please commit along with changes. For a complete change history, see the git log. -## Future +## 3.0.1 + +Released: July 27th, 2015 + +(Packaged from 28f6f4d) + +#### Summary + +The 3.0.1 fixes a few bugs in geojson parsing, svg parsing, and rendering. It also avoids a potential hang when using `line-geometry-transform` and includes a speedup for text rendering compared to v3.0.0. It is fully back compatibility with v3.0.0 and everyone is encouraged to upgrade. - Fixed text placement performance after #2949 (#2963) - Fixed rendering behavior for `text-minimum-path-length` which regressed in 3.0.0 (#2990) From 8424843eed49710e21759637e7a574cbc8e34690 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 19:04:28 -0700 Subject: [PATCH 21/24] make note of plugin move - refs #2980 [skip ci] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8d10ff78..763444947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ The 3.0.1 fixes a few bugs in geojson parsing, svg parsing, and rendering. It al - Fixed parsing of GeoJSON when unknown properties encountered at `FeatureCollection` level (#2983) - Fixed parsing of GeoJSON when properties contained `{}` (#2964) - Fixed potential hang due to invalid use of `line-geometry-transform` (6d6cb15) +- Moved unmaintained plugins out of core: `osm`, `occi`, and `rasterlite` (#2980) ## 3.0.0 From c8370485da83678373d747e114c96f4c0e8af7ac Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 19:05:18 -0700 Subject: [PATCH 22/24] use latest testdata [skip ci] --- test/data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/data b/test/data index 07e9a9c7c..503856319 160000 --- a/test/data +++ b/test/data @@ -1 +1 @@ -Subproject commit 07e9a9c7c3e9365d6b0d9023d77dfe897887af1c +Subproject commit 5038563194e75b95af155a337ce48f6478534022 From dfc6a41a27029e587ad8a1dc67175e473d6a530c Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 19:17:31 -0700 Subject: [PATCH 23/24] wip: add make release target [skip ci] --- Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Makefile b/Makefile index ef02f71f7..3ff06a59c 100755 --- a/Makefile +++ b/Makefile @@ -12,6 +12,25 @@ all: mapnik install: $(PYTHON) scons/scons.py -j$(JOBS) --config=cache --implicit-cache --max-drift=1 install +release: + export MAPNIK_VERSION=$(shell ./utils/mapnik-config/mapnik-config --version) && \ + export TARBALL_NAME="mapnik-v$${MAPNIK_VERSION}" && \ + cd /tmp/ && \ + rm -rf $${TARBALL_NAME} && \ + git clone --depth 1 --branch v$${MAPNIK_VERSION} git@github.com:mapnik/mapnik.git $${TARBALL_NAME} && \ + cd $${TARBALL_NAME} && \ + git checkout "tags/v$${MAPNIK_VERSION}" && \ + git submodule update --depth 1 --init && \ + rm -rf test/data/.git && \ + rm -rf test/data/.gitignore && \ + rm -rf test/data-visual/.git && \ + rm -rf test/data-visual/.gitignore && \ + rm -rf .git && \ + rm -rf .gitignore && \ + cd ../ && \ + tar cjf $${TARBALL_NAME}.tar.bz2 $${TARBALL_NAME}/ && \ + aws s3 cp --acl public-read $${TARBALL_NAME}.tar.bz2 s3://mapnik/dist/v$${MAPNIK_VERSION}/ + python: if [ ! -d ./bindings/python ]; then git clone git@github.com:mapnik/python-mapnik.git --recursive ./bindings/python; else (cd bindings/python && git pull && git submodule update --init); fi; make From a78a89564b41accbaccb402735b0adf0aaf59c3b Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 27 Jul 2015 20:27:21 -0700 Subject: [PATCH 24/24] back to development of > Mapnik 3.0.1 [skip ci] --- include/mapnik/version.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mapnik/version.hpp b/include/mapnik/version.hpp index cbba22f2c..a0a7b9d8b 100644 --- a/include/mapnik/version.hpp +++ b/include/mapnik/version.hpp @@ -23,7 +23,7 @@ #ifndef MAPNIK_VERSION_HPP #define MAPNIK_VERSION_HPP -#define MAPNIK_VERSION_IS_RELEASE 1 +#define MAPNIK_VERSION_IS_RELEASE 0 #define MAPNIK_MAJOR_VERSION 3 #define MAPNIK_MINOR_VERSION 0