[mapnik] 01/05: Imported Upstream version 3.0.9~rc2+ds
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Wed Nov 11 08:48:20 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository mapnik.
commit ebc6f3c133474c2253f3031cfa086ae9011f3533
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Wed Nov 11 00:05:59 2015 +0100
Imported Upstream version 3.0.9~rc2+ds
---
AUTHORS.md | 1 +
CHANGELOG.md | 10 +++
CODE_OF_CONDUCT.md | 22 ++++++
README.md | 4 +
SConstruct | 26 +++++--
docs/contributing.md | 8 ++
include/mapnik/attribute_collector.hpp | 6 +-
include/mapnik/css_color_grammar.hpp | 6 +-
include/mapnik/expression_grammar.hpp | 10 +--
include/mapnik/expression_grammar_impl.hpp | 8 +-
include/mapnik/geometry_adapters.hpp | 6 +-
include/mapnik/geometry_correct.hpp | 7 +-
include/mapnik/grid/grid_pixfmt.hpp | 4 +-
include/mapnik/grid/grid_renderer_base.hpp | 4 +-
include/mapnik/image_filter.hpp | 8 +-
include/mapnik/image_filter_grammar.hpp | 7 +-
include/mapnik/image_filter_grammar_impl.hpp | 3 +-
include/mapnik/image_util.hpp | 7 +-
include/mapnik/json/error_handler.hpp | 2 +-
.../mapnik/json/extract_bounding_box_grammar.hpp | 8 +-
include/mapnik/json/feature_grammar.hpp | 9 +--
include/mapnik/json/feature_grammar_impl.hpp | 35 +++++----
include/mapnik/json/generic_json.hpp | 6 +-
include/mapnik/json/geometry_generator_grammar.hpp | 6 +-
.../json/geometry_generator_grammar_impl.hpp | 6 +-
include/mapnik/json/geometry_grammar.hpp | 2 +-
include/mapnik/json/geometry_grammar_impl.hpp | 23 +++---
include/mapnik/json/positions_grammar.hpp | 12 +--
include/mapnik/json/positions_grammar_impl.hpp | 5 +-
.../mapnik/json/properties_generator_grammar.hpp | 7 +-
include/mapnik/json/topojson_grammar.hpp | 7 +-
include/mapnik/json/topology.hpp | 2 +-
include/mapnik/offset_converter.hpp | 90 +++++++++++++++++-----
include/mapnik/palette.hpp | 2 +-
include/mapnik/params_impl.hpp | 7 +-
include/mapnik/path_expression_grammar.hpp | 7 +-
include/mapnik/proj_strategy.hpp | 6 +-
include/mapnik/sql_utils.hpp | 6 +-
include/mapnik/svg/geometry_svg_generator.hpp | 7 +-
include/mapnik/svg/output/svg_output_grammars.hpp | 7 +-
.../mapnik/svg/output/svg_output_grammars_impl.hpp | 7 +-
include/mapnik/svg/svg_path_commands.hpp | 8 +-
include/mapnik/svg/svg_points_grammar.hpp | 5 +-
include/mapnik/svg/svg_renderer_agg.hpp | 4 +-
include/mapnik/svg/svg_transform_grammar.hpp | 7 +-
include/mapnik/text/harfbuzz_shaper.hpp | 49 +++++++++---
include/mapnik/util/container_adapter.hpp | 8 +-
include/mapnik/util/spirit_transform_attribute.hpp | 7 +-
include/mapnik/version.hpp | 2 +-
.../grid_renderer_base.hpp => warning_ignore.hpp} | 31 +++-----
include/mapnik/webp_io.hpp | 3 +-
include/mapnik/wkt/wkt_generator_grammar.hpp | 7 +-
include/mapnik/wkt/wkt_grammar.hpp | 7 +-
include/mapnik/xml_attribute_cast.hpp | 3 +-
plugins/input/csv/csv_datasource.cpp | 3 +-
plugins/input/csv/csv_datasource.hpp | 11 +--
plugins/input/csv/csv_featureset.hpp | 3 +-
plugins/input/csv/csv_index_featureset.hpp | 3 +-
plugins/input/csv/csv_utils.hpp | 6 +-
plugins/input/geojson/geojson_datasource.cpp | 11 +--
plugins/input/geojson/geojson_datasource.hpp | 10 +--
plugins/input/geojson/geojson_index_featureset.hpp | 3 +-
plugins/input/ogr/ogr_datasource.cpp | 4 +-
plugins/input/ogr/ogr_datasource.hpp | 3 +-
plugins/input/ogr/ogr_featureset.hpp | 3 +-
plugins/input/ogr/ogr_index_featureset.cpp | 3 +-
plugins/input/pgraster/pgraster_datasource.cpp | 4 +-
plugins/input/postgis/postgis_datasource.cpp | 4 +-
plugins/input/raster/raster_featureset.cpp | 4 +-
plugins/input/shape/dbfile.cpp | 7 +-
plugins/input/shape/dbfile.hpp | 3 +-
plugins/input/shape/shape_datasource.cpp | 6 +-
plugins/input/shape/shape_index_featureset.cpp | 5 +-
plugins/input/shape/shape_utils.cpp | 4 +-
plugins/input/shape/shapefile.hpp | 4 +-
plugins/input/sqlite/sqlite_connection.hpp | 4 +-
plugins/input/sqlite/sqlite_utils.hpp | 4 +-
plugins/input/topojson/topojson_datasource.hpp | 11 +--
plugins/input/topojson/topojson_featureset.cpp | 5 +-
src/box2d.cpp | 8 +-
src/color.cpp | 7 +-
src/conversions.cpp | 6 +-
src/dasharray_parser.cpp | 5 +-
src/datasource_cache.cpp | 4 +-
src/expression_node.cpp | 2 +-
src/font_engine_freetype.cpp | 4 +-
src/image_compositing.cpp | 6 +-
src/image_filter_types.cpp | 8 +-
src/image_options.cpp | 6 +-
src/image_scaling.cpp | 5 +-
src/jpeg_reader.cpp | 3 +-
src/mapped_memory_cache.cpp | 6 +-
src/marker_cache.cpp | 4 +-
src/miniz_png.cpp | 3 +-
src/png_reader.cpp | 4 +-
src/save_map.cpp | 6 +-
src/simplify.cpp | 6 +-
src/svg/output/svg_generator.cpp | 7 +-
src/svg/svg_parser.cpp | 5 +-
src/text/font_feature_settings.cpp | 7 +-
src/text/placements/simple.cpp | 8 +-
src/tiff_reader.cpp | 3 +-
src/webp_reader.cpp | 8 +-
test/unit/datasource/csv.cpp | 43 +++++++----
test/unit/datasource/geojson.cpp | 47 ++++++++++-
test/unit/geometry/geometry_equal.hpp | 3 +-
test/unit/vertex_adapter/clipping_test.cpp | 5 +-
test/unit/vertex_adapter/offset_converter.cpp | 6 +-
test/visual/map_sizes_grammar.hpp | 7 +-
utils/mapnik-index/build.py | 2 +
utils/mapnik-index/mapnik-index.cpp | 4 +-
utils/mapnik-index/process_csv_file.cpp | 3 +-
utils/mapnik-index/process_geojson_file.cpp | 7 +-
utils/mapnik-render/mapnik-render.cpp | 3 +-
utils/pgsql2sqlite/pgsql2sqlite.hpp | 4 +-
utils/shapeindex/shapeindex.cpp | 3 +-
utils/svg2png/svg2png.cpp | 3 +-
117 files changed, 434 insertions(+), 522 deletions(-)
diff --git a/AUTHORS.md b/AUTHORS.md
index 75589bf..7c2c94a 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -80,3 +80,4 @@ Mapnik is written by Artem Pavlenko with contributions from:
* Rich Wareham
* Nick Whitelegg
* Leslie Wu
+* Roman Galacz
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 486a20c..933a72b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,16 @@ Developers: Please commit along with changes.
For a complete change history, see the git log.
+## 3.0.9
+
+Released:
+
+(Packaged from )
+
+#### Summary
+
+ - Fixed offsetting of complex paths and sharp angles (https://github.com/mapnik/mapnik/pull/3160)
+
## 3.0.8
Released: October 23, 2015
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..65c05c5
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,22 @@
+# Contributor Code of Conduct
+
+As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
+
+We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery
+* Personal attacks
+* Trolling or insulting/derogatory comments
+* Public or private harassment
+* Publishing other's private information, such as physical or electronic addresses, without explicit permission
+* Other unethical or unprofessional conduct.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
+
+This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
+
+This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
\ No newline at end of file
diff --git a/README.md b/README.md
index 4d84bb4..18268de 100644
--- a/README.md
+++ b/README.md
@@ -22,6 +22,10 @@ For further information see [http://mapnik.org](http://mapnik.org) and also our
See [INSTALL.md](https://github.com/mapnik/mapnik/blob/master/INSTALL.md) for installation instructions and the [Install](https://github.com/mapnik/mapnik/wiki/Mapnik-Installation) page on the wiki for guides.
+# Code of Conduct
+
+Please note that this project is released with a [Contributor Code of Conduct](https://github.com/mapnik/mapnik/blob/master/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
+
# License
Mapnik software is free and is released under the LGPL ([GNU Lesser General Public License](http://www.gnu.org/licenses/lgpl.html_)). Please see [COPYING](https://github.com/mapnik/mapnik/blob/master/COPYING) for more information.
diff --git a/SConstruct b/SConstruct
index 642ea1d..f2b328e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -940,6 +940,24 @@ int main()
color_print(1,'\nHarfbuzz >= %s required but found ... %s' % (HARFBUZZ_MIN_VERSION_STRING,items[1]))
return False
+def harfbuzz_with_freetype_support(context):
+ ret = context.TryRun("""
+
+#include "harfbuzz/hb-ft.h"
+#include <iostream>
+
+int main()
+{
+ return 0;
+}
+
+""", '.cpp')
+ context.Message('Checking for HarfBuzz with freetype support\n')
+ context.Result(ret[0])
+ if ret[0]:
+ return True
+ return False
+
def boost_regex_has_icu(context):
if env['RUNTIME_LINK'] == 'static':
# re-order icu libs to ensure linux linker is happy
@@ -1061,6 +1079,7 @@ conf_tests = { 'prioritize_paths' : prioritize_paths,
'rollback_option' : rollback_option,
'icu_at_least_four_two' : icu_at_least_four_two,
'harfbuzz_version' : harfbuzz_version,
+ 'harfbuzz_with_freetype_support': harfbuzz_with_freetype_support,
'boost_regex_has_icu' : boost_regex_has_icu,
'sqlite_has_rtree' : sqlite_has_rtree,
'supports_cxx11' : supports_cxx11,
@@ -1356,6 +1375,8 @@ if not preconfigured:
elif libname == 'harfbuzz':
if not conf.harfbuzz_version():
env['SKIPPED_DEPS'].append('harfbuzz-min-version')
+ if not conf.harfbuzz_with_freetype_support():
+ env['MISSING_DEPS'].append('harfbuzz-with-freetype-support')
if env['BIGINT']:
env.Append(CPPDEFINES = '-DBIGINT')
@@ -1766,11 +1787,6 @@ if not preconfigured:
# TODO: clean up code more to make -Wextra -Wsign-compare -Wsign-conversion -Wconversion viable
common_cxx_flags = '-Wall %s %s -ftemplate-depth-300 -Wsign-compare -Wshadow ' % (env['WARNING_CXXFLAGS'], pthread)
- if 'clang++' in env['CXX']:
- common_cxx_flags += ' -Wno-unknown-pragmas -Wno-unsequenced '
- elif 'g++' in env['CXX']:
- common_cxx_flags += ' -Wno-pragmas '
-
if env['DEBUG']:
env.Append(CXXFLAGS = common_cxx_flags + '-O0')
else:
diff --git a/docs/contributing.md b/docs/contributing.md
index bb486a6..f05e9ae 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -274,3 +274,11 @@ To auto-convert to the above syntax you can put this in an .emacs file:
;;
(c-set-offset 'template-args-cont 'c-lineup-template-args)
+### Generating *.gcov files with LLVM/clang toolchain to check tests coverage
+
+* Ensure `llvm-cov` is available
+ * On OS X do `xcrun -f llvm-cov` to see the location of the binary
+* Build and link mapnik with `--coverage` and ensure optimization is off and profile flags are present. For example pass following options to Scons: `CUSTOM_CXXFLAGS='--coverage -g -O0' LDFLAGS='--coverage'`
+* Run test(s) e.g `make test`
+* To generate *.gcov file(s) run `llvm-cov gcov <path-to-cpp-file>`
+* *.gcov files can be viewed in text editor
diff --git a/include/mapnik/attribute_collector.hpp b/include/mapnik/attribute_collector.hpp
index 878bfd4..cfd29cc 100644
--- a/include/mapnik/attribute_collector.hpp
+++ b/include/mapnik/attribute_collector.hpp
@@ -39,12 +39,8 @@
#include <mapnik/util/conversions.hpp>
#include <mapnik/util/variant.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string/replace.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/css_color_grammar.hpp b/include/mapnik/css_color_grammar.hpp
index 04ff02d..21e6391 100644
--- a/include/mapnik/css_color_grammar.hpp
+++ b/include/mapnik/css_color_grammar.hpp
@@ -30,11 +30,7 @@
// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/qi_action.hpp>
#include <boost/spirit/include/qi_lexeme.hpp>
diff --git a/include/mapnik/expression_grammar.hpp b/include/mapnik/expression_grammar.hpp
index 5bb132f..ff9423e 100644
--- a/include/mapnik/expression_grammar.hpp
+++ b/include/mapnik/expression_grammar.hpp
@@ -29,15 +29,9 @@
#include <mapnik/unicode.hpp>
#include <mapnik/expression_node.hpp>
#include <mapnik/function_call.hpp>
-//#include <mapnik/datasource.hpp>
-// 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 "-Wsign-compare"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/support_locals.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
diff --git a/include/mapnik/expression_grammar_impl.hpp b/include/mapnik/expression_grammar_impl.hpp
index 93b6d86..9c82cb8 100644
--- a/include/mapnik/expression_grammar_impl.hpp
+++ b/include/mapnik/expression_grammar_impl.hpp
@@ -30,14 +30,8 @@
#include <mapnik/value_types.hpp>
#include <mapnik/function_call.hpp>
-// 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 "-Wsign-compare"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
#include <boost/spirit/include/phoenix_object.hpp>
diff --git a/include/mapnik/geometry_adapters.hpp b/include/mapnik/geometry_adapters.hpp
index 3f08c2b..7a70846 100644
--- a/include/mapnik/geometry_adapters.hpp
+++ b/include/mapnik/geometry_adapters.hpp
@@ -27,11 +27,7 @@
// undef B0 to workaround https://svn.boost.org/trac/boost/ticket/10467
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
-#pragma GCC diagnostic ignored "-Wunused-parameter"
+#include <mapnik/warning_ignore.hpp>
#undef B0
#include <boost/geometry/geometries/register/linestring.hpp>
#include <boost/geometry/geometries/register/point.hpp>
diff --git a/include/mapnik/geometry_correct.hpp b/include/mapnik/geometry_correct.hpp
index dcbb2d7..dc83ad3 100644
--- a/include/mapnik/geometry_correct.hpp
+++ b/include/mapnik/geometry_correct.hpp
@@ -28,12 +28,7 @@
#include <mapnik/util/variant.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-variable"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/geometry/algorithms/correct.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/grid/grid_pixfmt.hpp b/include/mapnik/grid/grid_pixfmt.hpp
index fbd6f51..dda2412 100644
--- a/include/mapnik/grid/grid_pixfmt.hpp
+++ b/include/mapnik/grid/grid_pixfmt.hpp
@@ -27,9 +27,7 @@
#include <mapnik/grid/grid_rendering_buffer.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include "agg_basics.h"
#include <mapnik/grid/grid_pixel.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/grid/grid_renderer_base.hpp b/include/mapnik/grid/grid_renderer_base.hpp
index 462010b..1000083 100644
--- a/include/mapnik/grid/grid_renderer_base.hpp
+++ b/include/mapnik/grid/grid_renderer_base.hpp
@@ -24,9 +24,7 @@
#define MAPNIK_GRID_RENDERER_BASE_HPP
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include "agg_renderer_base.h"
#include <mapnik/grid/grid_pixel.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/image_filter.hpp b/include/mapnik/image_filter.hpp
index 3b188a3..62a3f3b 100644
--- a/include/mapnik/image_filter.hpp
+++ b/include/mapnik/image_filter.hpp
@@ -29,14 +29,8 @@
#include <mapnik/image_util.hpp>
#include <mapnik/util/hsl.hpp>
-// boost GIL
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wc++11-narrowing"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/gil/gil_all.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/image_filter_grammar.hpp b/include/mapnik/image_filter_grammar.hpp
index 5f2d719..04ced60 100644
--- a/include/mapnik/image_filter_grammar.hpp
+++ b/include/mapnik/image_filter_grammar.hpp
@@ -23,13 +23,8 @@
#ifndef MAPNIK_IMAGE_FILITER_GRAMMAR_HPP
#define MAPNIK_IMAGE_FILITER_GRAMMAR_HPP
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/fusion/include/adapt_struct.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/image_filter_grammar_impl.hpp b/include/mapnik/image_filter_grammar_impl.hpp
index e41f63e..4dfa540 100644
--- a/include/mapnik/image_filter_grammar_impl.hpp
+++ b/include/mapnik/image_filter_grammar_impl.hpp
@@ -24,9 +24,8 @@
#include <mapnik/image_filter_types.hpp>
#include <mapnik/image_filter_grammar.hpp>
-// spirit
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/phoenix.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/image_util.hpp b/include/mapnik/image_util.hpp
index 1207bb8..0db5a37 100644
--- a/include/mapnik/image_util.hpp
+++ b/include/mapnik/image_util.hpp
@@ -27,12 +27,9 @@
#include <mapnik/config.hpp>
#include <mapnik/pixel_types.hpp>
#include <mapnik/image_compositing.hpp>
-// boost
+
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/optional.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/json/error_handler.hpp b/include/mapnik/json/error_handler.hpp
index 02b38cf..46a92c8 100644
--- a/include/mapnik/json/error_handler.hpp
+++ b/include/mapnik/json/error_handler.hpp
@@ -25,7 +25,7 @@
#include <mapnik/config.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/home/qi.hpp>
#include <boost/spirit/home/support/info.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/json/extract_bounding_box_grammar.hpp b/include/mapnik/json/extract_bounding_box_grammar.hpp
index bfe9185..7d0b7a1 100644
--- a/include/mapnik/json/extract_bounding_box_grammar.hpp
+++ b/include/mapnik/json/extract_bounding_box_grammar.hpp
@@ -28,13 +28,9 @@
#include <mapnik/json/error_handler.hpp>
#include <mapnik/box2d.hpp>
#include <mapnik/geometry.hpp>
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
#include <boost/fusion/adapted/std_tuple.hpp>
diff --git a/include/mapnik/json/feature_grammar.hpp b/include/mapnik/json/feature_grammar.hpp
index 59261d7..a4bdfa1 100644
--- a/include/mapnik/json/feature_grammar.hpp
+++ b/include/mapnik/json/feature_grammar.hpp
@@ -33,7 +33,7 @@
#include <mapnik/json/value_converters.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix.hpp>
#include <boost/spirit/include/support_line_pos_iterator.hpp>
@@ -96,13 +96,12 @@ struct feature_grammar :
{
feature_grammar(mapnik::transcoder const& tr);
- // start
// generic JSON
generic_json<Iterator> json_;
// geoJSON
- qi::rule<Iterator,void(FeatureType&),space_type> feature; // START
- qi::rule<Iterator,space_type> feature_type;
-
+ qi::rule<Iterator, void(FeatureType&),space_type> start;
+ qi::rule<Iterator, qi::locals<bool>, void(FeatureType&),space_type> feature;
+ qi::rule<Iterator, space_type> feature_type;
qi::rule<Iterator,void(FeatureType &),space_type> properties;
qi::rule<Iterator,qi::locals<std::string>, void(FeatureType &),space_type> attributes;
qi::rule<Iterator, json_value(), space_type> attribute_value;
diff --git a/include/mapnik/json/feature_grammar_impl.hpp b/include/mapnik/json/feature_grammar_impl.hpp
index 409925a..61a23f9 100644
--- a/include/mapnik/json/feature_grammar_impl.hpp
+++ b/include/mapnik/json/feature_grammar_impl.hpp
@@ -28,7 +28,7 @@ namespace mapnik { namespace json {
template <typename Iterator, typename FeatureType, typename ErrorHandler>
feature_grammar<Iterator,FeatureType,ErrorHandler>::feature_grammar(mapnik::transcoder const& tr)
- : feature_grammar::base_type(feature,"feature"),
+ : feature_grammar::base_type(start,"feature"),
json_(),
put_property_(put_property(tr))
{
@@ -56,16 +56,16 @@ feature_grammar<Iterator,FeatureType,ErrorHandler>::feature_grammar(mapnik::tran
json_.pairs = json_.key_value % lit(',')
;
- json_.key_value = (json_.string_ >> lit(':') >> json_.value)
+ json_.key_value = (json_.string_ > lit(':') > json_.value)
;
json_.object = lit('{')
- >> *json_.pairs
- >> lit('}')
+ > *json_.pairs
+ > lit('}')
;
json_.array = lit('[')
- >> json_.value >> *(lit(',') >> json_.value)
- >> lit(']')
+ > json_.value > *(lit(',') > json_.value)
+ > lit(']')
;
json_.number = json_.strict_double[_val = json_.double_converter(_1)]
| json_.int__[_val = json_.integer_converter(_1)]
@@ -75,15 +75,20 @@ feature_grammar<Iterator,FeatureType,ErrorHandler>::feature_grammar(mapnik::tran
;
// geojson types
- feature_type = lit("\"type\"")
- >> lit(':')
- >> lit("\"Feature\"")
+ feature_type = lit("\"type\"") > lit(':') > lit("\"Feature\"")
;
- feature = lit('{')
- >> (feature_type | (lit("\"geometry\"") >> lit(':')
- >> geometry_grammar_[set_geometry(_r1, _1)]) | properties(_r1) | json_.key_value) % lit(',')
- >> lit('}')
+ start = feature(_r1);
+
+ feature = eps[_a = false] > lit('{') >
+ (feature_type[_a = true]
+ |
+ (lit("\"geometry\"") > lit(':') > geometry_grammar_[set_geometry(_r1, _1)])
+ |
+ properties(_r1)
+ |
+ json_.key_value) % lit(',')
+ > eps(_a) > lit('}')
;
properties = lit("\"properties\"")
@@ -96,10 +101,10 @@ feature_grammar<Iterator,FeatureType,ErrorHandler>::feature_grammar(mapnik::tran
attribute_value %= json_.number | json_.string_ | stringify_object | stringify_array
;
- stringify_object %= char_('{')[_a = 1 ] >> *(eps(_a > 0) >> (char_('{')[_a +=1] | char_('}')[_a -=1] | char_))
+ stringify_object %= char_('{')[_a = 1 ] > *(eps(_a > 0) > (char_('{')[_a +=1] | char_('}')[_a -=1] | char_))
;
- stringify_array %= char_('[')[_a = 1 ] >> *(eps(_a > 0) >> (char_('[')[_a +=1] | char_(']')[_a -=1] | char_))
+ stringify_array %= char_('[')[_a = 1 ] > *(eps(_a > 0) > (char_('[')[_a +=1] | char_(']')[_a -=1] | char_))
;
feature.name("Feature");
diff --git a/include/mapnik/json/generic_json.hpp b/include/mapnik/json/generic_json.hpp
index adc1990..3313410 100644
--- a/include/mapnik/json/generic_json.hpp
+++ b/include/mapnik/json/generic_json.hpp
@@ -28,11 +28,7 @@
#include <mapnik/json/value_converters.hpp>
#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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/json/geometry_generator_grammar.hpp b/include/mapnik/json/geometry_generator_grammar.hpp
index 1095d32..eb484b6 100644
--- a/include/mapnik/json/geometry_generator_grammar.hpp
+++ b/include/mapnik/json/geometry_generator_grammar.hpp
@@ -30,11 +30,7 @@
#include <mapnik/geometry_fusion_adapted.hpp>
// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/karma.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
#include <boost/math/special_functions/trunc.hpp> // for vc++ and android whose c++11 libs lack std::trunc
diff --git a/include/mapnik/json/geometry_generator_grammar_impl.hpp b/include/mapnik/json/geometry_generator_grammar_impl.hpp
index f944980..62d6a85 100644
--- a/include/mapnik/json/geometry_generator_grammar_impl.hpp
+++ b/include/mapnik/json/geometry_generator_grammar_impl.hpp
@@ -27,11 +27,7 @@
// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/karma.hpp>
#include <boost/spirit/include/phoenix.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
diff --git a/include/mapnik/json/geometry_grammar.hpp b/include/mapnik/json/geometry_grammar.hpp
index 2138777..7d768a7 100644
--- a/include/mapnik/json/geometry_grammar.hpp
+++ b/include/mapnik/json/geometry_grammar.hpp
@@ -50,7 +50,7 @@ struct geometry_grammar :
positions_grammar<Iterator> coordinates;
boost::phoenix::function<create_geometry_impl> create_geometry;
// error handler
- boost::phoenix::function<ErrorHandler> const error_handler;
+ ErrorHandler error_handler;
};
}}
diff --git a/include/mapnik/json/geometry_grammar_impl.hpp b/include/mapnik/json/geometry_grammar_impl.hpp
index 7cef865..30fad88 100644
--- a/include/mapnik/json/geometry_grammar_impl.hpp
+++ b/include/mapnik/json/geometry_grammar_impl.hpp
@@ -37,7 +37,8 @@ namespace mapnik { namespace json {
template <typename Iterator, typename ErrorHandler >
geometry_grammar<Iterator, ErrorHandler>::geometry_grammar()
- : geometry_grammar::base_type(start,"geometry")
+ : geometry_grammar::base_type(start,"geometry"),
+ coordinates(error_handler)
{
qi::lit_type lit;
qi::int_type int_;
@@ -54,16 +55,15 @@ geometry_grammar<Iterator, ErrorHandler>::geometry_grammar()
using qi::on_error;
using phoenix::push_back;
- start = geometry.alias(); // | geometry_collection;
+ start = geometry.alias() | lit("null");
- geometry = (lit('{')[_a = 0 ]
- >> (-lit(',') >> (lit("\"type\"") >> lit(':') >> geometry_type_dispatch[_a = _1])
- ^
- (-lit(',') >> (lit("\"coordinates\"") > lit(':') > coordinates[_b = _1]))
- ^
- (-lit(',') >> lit("\"geometries\"") >> lit(':') >> lit('[') >> geometry_collection[_val = _1] >> lit(']')))[create_geometry(_val,_a,_b)]
- >> lit('}'))
- | lit("null")
+ geometry = lit('{')[_a = 0]
+ > (-lit(',') >> (lit("\"type\"") > lit(':') > geometry_type_dispatch[_a = _1])
+ ^
+ (-lit(',') >> (lit("\"coordinates\"") > lit(':') > coordinates[_b = _1]))
+ ^
+ (-lit(',') >> (lit("\"geometries\"") > lit(':') > lit('[') > geometry_collection[_val = _1] > lit(']'))))[create_geometry(_val,_a,_b)]
+ > lit('}')
;
geometry_collection = geometry[push_back(_val, _1)] % lit(',')
@@ -84,7 +84,8 @@ geometry_grammar<Iterator, ErrorHandler>::geometry_grammar()
geometry_type_dispatch.name("type: (Point|LineString|Polygon|MultiPoint|MultiLineString|MultiPolygon|GeometryCollection)");
coordinates.name("coordinates");
// error handler
- on_error<fail>(start, error_handler(_1, _2, _3, _4));
+ auto error_handler_function = boost::phoenix::function<ErrorHandler>(error_handler);
+ on_error<fail>(start, error_handler_function(_1, _2, _3, _4));
}
}}
diff --git a/include/mapnik/json/positions_grammar.hpp b/include/mapnik/json/positions_grammar.hpp
index b7d65d0..a652e8f 100644
--- a/include/mapnik/json/positions_grammar.hpp
+++ b/include/mapnik/json/positions_grammar.hpp
@@ -29,13 +29,9 @@
#include <mapnik/json/error_handler.hpp>
#include <mapnik/geometry.hpp>
#include <mapnik/geometry_fusion_adapted.hpp>
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
#include <boost/fusion/adapted/std_tuple.hpp>
@@ -78,7 +74,7 @@ template <typename Iterator, typename ErrorHandler = error_handler<Iterator> >
struct positions_grammar :
qi::grammar<Iterator,coordinates(),space_type>
{
- positions_grammar();
+ positions_grammar(ErrorHandler & error_handler);
qi::rule<Iterator, coordinates(),space_type> coords;
qi::rule<Iterator, boost::optional<position>(), space_type> pos;
qi::rule<Iterator, positions(), space_type> ring;
@@ -86,8 +82,6 @@ struct positions_grammar :
qi::rule<Iterator, std::vector<std::vector<positions> >(), space_type> rings_array;
boost::phoenix::function<set_position_impl> set_position;
boost::phoenix::function<push_position_impl> push_position;
- // error handler
- boost::phoenix::function<ErrorHandler> const error_handler;
};
}}
diff --git a/include/mapnik/json/positions_grammar_impl.hpp b/include/mapnik/json/positions_grammar_impl.hpp
index 7737e46..1347675 100644
--- a/include/mapnik/json/positions_grammar_impl.hpp
+++ b/include/mapnik/json/positions_grammar_impl.hpp
@@ -35,7 +35,7 @@
namespace mapnik { namespace json {
template <typename Iterator, typename ErrorHandler>
-positions_grammar<Iterator, ErrorHandler>::positions_grammar()
+positions_grammar<Iterator, ErrorHandler>::positions_grammar(ErrorHandler & error_handler)
: positions_grammar::base_type(coords,"coordinates")
{
qi::lit_type lit;
@@ -66,7 +66,8 @@ positions_grammar<Iterator, ErrorHandler>::positions_grammar()
rings_array.name("Rings array");
// error handler
- on_error<fail>(coords, error_handler(_1, _2, _3, _4));
+ auto error_handler_function = boost::phoenix::function<ErrorHandler>(error_handler);
+ on_error<fail>(coords, error_handler_function(_1, _2, _3, _4));
}
}}
diff --git a/include/mapnik/json/properties_generator_grammar.hpp b/include/mapnik/json/properties_generator_grammar.hpp
index 781d807..e0f7be6 100644
--- a/include/mapnik/json/properties_generator_grammar.hpp
+++ b/include/mapnik/json/properties_generator_grammar.hpp
@@ -27,13 +27,8 @@
#include <mapnik/value.hpp>
#include <mapnik/feature_kv_iterator.hpp>
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/karma.hpp>
#include <boost/spirit/include/phoenix.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
diff --git a/include/mapnik/json/topojson_grammar.hpp b/include/mapnik/json/topojson_grammar.hpp
index 1cc967e..be64b91 100644
--- a/include/mapnik/json/topojson_grammar.hpp
+++ b/include/mapnik/json/topojson_grammar.hpp
@@ -29,13 +29,8 @@
#include <mapnik/json/topology.hpp>
#include <mapnik/json/value_converters.hpp>
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/json/topology.hpp b/include/mapnik/json/topology.hpp
index 48453df..b859cfc 100644
--- a/include/mapnik/json/topology.hpp
+++ b/include/mapnik/json/topology.hpp
@@ -27,7 +27,7 @@
#include <mapnik/util/variant.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
+#include <mapnik/warning_ignore.hpp>
#include <boost/fusion/include/adapt_struct.hpp>
#include <boost/fusion/adapted/std_tuple.hpp>
#include <boost/optional.hpp>
diff --git a/include/mapnik/offset_converter.hpp b/include/mapnik/offset_converter.hpp
index 51d43e3..a5ac57c 100644
--- a/include/mapnik/offset_converter.hpp
+++ b/include/mapnik/offset_converter.hpp
@@ -35,6 +35,7 @@
#include <cmath>
#include <vector>
#include <cstddef>
+#include <algorithm>
namespace mapnik
{
@@ -261,7 +262,15 @@ private:
v.cmd = u.cmd;
}
- void displace2(vertex2d & v, double a, double b) const
+ int point_line_position(vertex2d const& a, vertex2d const& b, vertex2d const& point) const
+ {
+ double position = (b.x - a.x) * (point.y - a.y) - (b.y - a.y) * (point.x - a.x);
+ if (position > 1e-6) return 1;
+ if (position < -1e-6) return -1;
+ return 0;
+ }
+
+ void displace2(vertex2d & v1, vertex2d const& v0, vertex2d const& v2, double a, double b) const
{
double sa = offset_ * std::sin(a);
double ca = offset_ * std::cos(a);
@@ -269,26 +278,60 @@ private:
double hsa = h * sa;
double hca = h * ca;
double abs_offset = std::abs(offset_);
- if (hsa > 1.0 * abs_offset)
- {
- hsa = 1.0 * abs_offset;
- }
- else if (hsa < -1.0 * abs_offset)
+ double hsaca = ca-hsa;
+ double hcasa = -sa-hca;
+ double abs_hsaca = std::abs(hsaca);
+ double abs_hcasa = std::abs(hcasa);
+ double abs_hsa = std::abs(hsa);
+ double abs_hca = std::abs(hca);
+
+ vertex2d v_tmp(vertex2d::no_init);
+ v_tmp.x = v1.x - sa - hca;
+ v_tmp.y = v1.y + ca - hsa;
+ v_tmp.cmd = v1.cmd;
+
+ int same = point_line_position(v0, v2, v_tmp)*point_line_position(v0, v2, v1);
+
+ if (same >= 0 && std::abs(h) < 10)
{
- hsa = -1.0 * abs_offset;
+ v1.x = v_tmp.x;
+ v1.y = v_tmp.y;
}
- if (hca > 1.0 * abs_offset)
+ else if ((v0.x-v1.x)*(v0.x-v1.x) + (v0.y-v1.y)*(v0.y-v1.y) +
+ (v0.x-v2.x)*(v0.x-v2.x) + (v0.y-v2.y)*(v0.y-v2.y) > offset_*offset_)
{
- hca = 1.0 * abs_offset;
+ if (abs_hsa > abs_offset || abs_hca > abs_offset)
+ {
+ double scale = std::max(abs_hsa,abs_hca);
+ scale = scale < 1e-6 ? 1. : abs_offset / scale;
+ // interpolate hsa, hca to <0,abs_offset>
+ hsa = hsa * scale;
+ sa = sa * scale;
+ hca = hca * scale;
+ ca = ca * scale;
+ }
+ v1.x = v1.x - sa - hca;
+ v1.y = v1.y + ca - hsa;
}
- else if (hca < -1.0 * abs_offset)
- {
- hca = -1.0 * abs_offset;
+ else
+ {
+ if (abs_hsaca*abs_hsaca + abs_hcasa*abs_hcasa > abs_offset*abs_offset)
+ {
+ double d = (abs_hsaca*abs_hsaca + abs_hcasa*abs_hcasa);
+ d = d < 1e-6 ? 1. : d;
+ double scale = (abs_offset*abs_offset)/d;
+ v1.x = v1.x + hcasa*scale;
+ v1.y = v1.y + hsaca*scale;
+ }
+ else
+ {
+ v1.x = v1.x + hcasa;
+ v1.y = v1.y + hsaca;
+ }
}
- v.x = v.x - sa - hca;
- v.y = v.y + ca - hsa;
}
-
+
+
status init_vertices()
{
if (status_ != initial) // already initialized
@@ -412,7 +455,7 @@ private:
if (bulge_steps == 0)
{
- displace2(v1, angle_a, angle_b);
+ displace2(v1, v0, v2, angle_a, angle_b);
push_vertex(v1);
}
else
@@ -439,7 +482,9 @@ private:
}
start_v2.x = v2.x;
start_v2.y = v2.y;
- bool continue_loop = true;
+ bool continue_loop = true;
+ vertex2d tmp_prev(vertex2d::no_init);
+
while (i < points.size())
{
v1 = v2;
@@ -530,11 +575,15 @@ private:
<< " degrees ((< with " << bulge_steps << " segments";
}
#endif
+ tmp_prev.cmd = v1.cmd;
+ tmp_prev.x = v1.x;
+ tmp_prev.y = v1.y;
+
if (v1.cmd == SEG_MOVETO)
{
if (bulge_steps == 0)
{
- displace2(v1, angle_a, angle_b);
+ displace2(v1, v0, v2, angle_a, angle_b);
push_vertex(v1);
}
else
@@ -547,7 +596,7 @@ private:
{
if (bulge_steps == 0)
{
- displace2(v1, angle_a, angle_b);
+ displace2(v1, v0, v2, angle_a, angle_b);
push_vertex(v1);
}
else
@@ -565,6 +614,9 @@ private:
push_vertex(v1);
}
}
+ v0.cmd = tmp_prev.cmd;
+ v0.x = tmp_prev.x;
+ v0.y = tmp_prev.y;
}
// last vertex
diff --git a/include/mapnik/palette.hpp b/include/mapnik/palette.hpp
index 377967a..5f96272 100644
--- a/include/mapnik/palette.hpp
+++ b/include/mapnik/palette.hpp
@@ -31,7 +31,7 @@
#define USE_DENSE_HASH_MAP
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#ifdef USE_DENSE_HASH_MAP
#include <mapnik/sparsehash/dense_hash_map>
using rgba_hash_table = google::dense_hash_map<unsigned int, unsigned char>;
diff --git a/include/mapnik/params_impl.hpp b/include/mapnik/params_impl.hpp
index 469a936..f127c4c 100644
--- a/include/mapnik/params_impl.hpp
+++ b/include/mapnik/params_impl.hpp
@@ -29,13 +29,8 @@
#include <mapnik/boolean.hpp>
#include <mapnik/util/conversions.hpp>
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/optional.hpp>
#include <boost/lexical_cast.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/path_expression_grammar.hpp b/include/mapnik/path_expression_grammar.hpp
index 04d422a..61a3db7 100644
--- a/include/mapnik/path_expression_grammar.hpp
+++ b/include/mapnik/path_expression_grammar.hpp
@@ -26,13 +26,8 @@
// mapnik
#include <mapnik/path_expression.hpp>
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/proj_strategy.hpp b/include/mapnik/proj_strategy.hpp
index 9bfd2e1..064f366 100644
--- a/include/mapnik/proj_strategy.hpp
+++ b/include/mapnik/proj_strategy.hpp
@@ -29,11 +29,7 @@
#include <mapnik/proj_transform.hpp>
#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 <mapnik/warning_ignore.hpp>
#include <boost/geometry/core/coordinate_type.hpp>
#include <boost/geometry/core/access.hpp>
#include <boost/numeric/conversion/cast.hpp>
diff --git a/include/mapnik/sql_utils.hpp b/include/mapnik/sql_utils.hpp
index d90a55f..2720e84 100644
--- a/include/mapnik/sql_utils.hpp
+++ b/include/mapnik/sql_utils.hpp
@@ -28,11 +28,7 @@
// 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 <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string/replace.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/svg/geometry_svg_generator.hpp b/include/mapnik/svg/geometry_svg_generator.hpp
index e70166f..11aa5c9 100644
--- a/include/mapnik/svg/geometry_svg_generator.hpp
+++ b/include/mapnik/svg/geometry_svg_generator.hpp
@@ -33,13 +33,8 @@
#include <mapnik/util/path_iterator.hpp>
#include <mapnik/util/container_adapter.hpp>
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/karma.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
diff --git a/include/mapnik/svg/output/svg_output_grammars.hpp b/include/mapnik/svg/output/svg_output_grammars.hpp
index 3a47e43..769671b 100644
--- a/include/mapnik/svg/output/svg_output_grammars.hpp
+++ b/include/mapnik/svg/output/svg_output_grammars.hpp
@@ -36,13 +36,8 @@ namespace mapnik { namespace svg {
struct root_output_attributes;
}}
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/karma_nonterminal.hpp>
#include <boost/spirit/include/karma_rule.hpp>
#include <boost/fusion/adapted/struct.hpp>
diff --git a/include/mapnik/svg/output/svg_output_grammars_impl.hpp b/include/mapnik/svg/output/svg_output_grammars_impl.hpp
index 41f6928..cbce919 100644
--- a/include/mapnik/svg/output/svg_output_grammars_impl.hpp
+++ b/include/mapnik/svg/output/svg_output_grammars_impl.hpp
@@ -26,13 +26,8 @@
// mapnik
#include <mapnik/svg/output/svg_output_grammars.hpp>
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/karma.hpp>
#include <boost/fusion/include/std_pair.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/svg/svg_path_commands.hpp b/include/mapnik/svg/svg_path_commands.hpp
index 105b4ca..cf69e13 100644
--- a/include/mapnik/svg/svg_path_commands.hpp
+++ b/include/mapnik/svg/svg_path_commands.hpp
@@ -25,14 +25,10 @@
// mapnik
#include <mapnik/global.hpp>
+#include <mapnik/config.hpp>
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
diff --git a/include/mapnik/svg/svg_points_grammar.hpp b/include/mapnik/svg/svg_points_grammar.hpp
index dbaed84..94602cc 100644
--- a/include/mapnik/svg/svg_points_grammar.hpp
+++ b/include/mapnik/svg/svg_points_grammar.hpp
@@ -25,11 +25,14 @@
// mapnik
#include <mapnik/svg/svg_path_commands.hpp>
-// spirit
+
+#pragma GCC diagnostic push
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
+#pragma GCC diagnostic pop
namespace mapnik { namespace svg {
diff --git a/include/mapnik/svg/svg_renderer_agg.hpp b/include/mapnik/svg/svg_renderer_agg.hpp
index ad24cb9..ad574cc 100644
--- a/include/mapnik/svg/svg_renderer_agg.hpp
+++ b/include/mapnik/svg/svg_renderer_agg.hpp
@@ -32,9 +32,7 @@
#if defined(GRID_RENDERER)
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <mapnik/grid/grid_pixel.hpp>
#pragma GCC diagnostic pop
#endif
diff --git a/include/mapnik/svg/svg_transform_grammar.hpp b/include/mapnik/svg/svg_transform_grammar.hpp
index e0f5231..1465f3a 100644
--- a/include/mapnik/svg/svg_transform_grammar.hpp
+++ b/include/mapnik/svg/svg_transform_grammar.hpp
@@ -29,13 +29,8 @@
// agg
#include <agg_trans_affine.h>
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
diff --git a/include/mapnik/text/harfbuzz_shaper.hpp b/include/mapnik/text/harfbuzz_shaper.hpp
index 8ba5d19..0f23bc8 100644
--- a/include/mapnik/text/harfbuzz_shaper.hpp
+++ b/include/mapnik/text/harfbuzz_shaper.hpp
@@ -93,6 +93,19 @@ static void shape_text(text_line & line,
std::size_t pos = 0;
font_feature_settings const& ff_settings = text_item.format_->ff_settings;
int ff_count = safe_cast<int>(ff_settings.count());
+
+ // rendering information for a single glyph
+ struct glyph_face_info
+ {
+ face_ptr face;
+ hb_glyph_info_t glyph;
+ hb_glyph_position_t position;
+ };
+ // this table is filled with information for rendering each glyph, so that
+ // several font faces can be used in a single text_item
+ std::vector<glyph_face_info> glyphinfos;
+ unsigned valid_glyphs = 0;
+
for (auto const& face : *face_set)
{
++pos;
@@ -112,20 +125,29 @@ static void shape_text(text_line & line,
unsigned num_glyphs = hb_buffer_get_length(buffer.get());
+ // if the number of rendered glyphs has increased, we need to resize the table
+ if (num_glyphs > glyphinfos.size())
+ {
+ glyphinfos.resize(num_glyphs);
+ }
+
hb_glyph_info_t *glyphs = hb_buffer_get_glyph_infos(buffer.get(), nullptr);
hb_glyph_position_t *positions = hb_buffer_get_glyph_positions(buffer.get(), nullptr);
- bool font_has_all_glyphs = true;
// Check if all glyphs are valid.
for (unsigned i=0; i<num_glyphs; ++i)
{
- if (!glyphs[i].codepoint)
+ // if we have a valid codepoint, save rendering info.
+ if (glyphs[i].codepoint)
{
- font_has_all_glyphs = false;
- break;
+ if (!glyphinfos[i].glyph.codepoint)
+ {
+ ++valid_glyphs;
+ }
+ glyphinfos[i] = { face, glyphs[i], positions[i] };
}
}
- if (!font_has_all_glyphs && (pos < num_faces))
+ if (valid_glyphs < num_glyphs && (pos < num_faces))
{
//Try next font in fontset
continue;
@@ -134,14 +156,21 @@ static void shape_text(text_line & line,
double max_glyph_height = 0;
for (unsigned i=0; i<num_glyphs; ++i)
{
- auto const& gpos = positions[i];
- auto const& glyph = glyphs[i];
+ auto& gpos = positions[i];
+ auto& glyph = glyphs[i];
+ face_ptr theface = face;
+ if (glyphinfos[i].glyph.codepoint)
+ {
+ gpos = glyphinfos[i].position;
+ glyph = glyphinfos[i].glyph;
+ theface = glyphinfos[i].face;
+ }
unsigned char_index = glyph.cluster;
glyph_info g(glyph.codepoint,char_index,text_item.format_);
- if (face->glyph_dimensions(g))
+ if (theface->glyph_dimensions(g))
{
- g.face = face;
- g.scale_multiplier = size / face->get_face()->units_per_EM;
+ g.face = theface;
+ g.scale_multiplier = size / theface->get_face()->units_per_EM;
//Overwrite default advance with better value provided by HarfBuzz
g.unscaled_advance = gpos.x_advance;
g.offset.set(gpos.x_offset * g.scale_multiplier, gpos.y_offset * g.scale_multiplier);
diff --git a/include/mapnik/util/container_adapter.hpp b/include/mapnik/util/container_adapter.hpp
index e07d709..8c70c4c 100644
--- a/include/mapnik/util/container_adapter.hpp
+++ b/include/mapnik/util/container_adapter.hpp
@@ -24,16 +24,10 @@
#define CONTAINER_ADAPTER_HPP
// mapnik
-
-
#include <mapnik/util/path_iterator.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/support_container.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/util/spirit_transform_attribute.hpp b/include/mapnik/util/spirit_transform_attribute.hpp
index f7fb1ca..c4176f1 100644
--- a/include/mapnik/util/spirit_transform_attribute.hpp
+++ b/include/mapnik/util/spirit_transform_attribute.hpp
@@ -28,13 +28,8 @@
#include <cstdint>
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/karma.hpp>
#pragma GCC diagnostic pop
diff --git a/include/mapnik/version.hpp b/include/mapnik/version.hpp
index 3fa21b8..a68d8b5 100644
--- a/include/mapnik/version.hpp
+++ b/include/mapnik/version.hpp
@@ -25,7 +25,7 @@
#define MAPNIK_MAJOR_VERSION 3
#define MAPNIK_MINOR_VERSION 0
-#define MAPNIK_PATCH_VERSION 8
+#define MAPNIK_PATCH_VERSION 9
#define MAPNIK_VERSION (MAPNIK_MAJOR_VERSION*100000) + (MAPNIK_MINOR_VERSION*100) + (MAPNIK_PATCH_VERSION)
diff --git a/include/mapnik/grid/grid_renderer_base.hpp b/include/mapnik/warning_ignore.hpp
similarity index 65%
copy from include/mapnik/grid/grid_renderer_base.hpp
copy to include/mapnik/warning_ignore.hpp
index 462010b..186087b 100644
--- a/include/mapnik/grid/grid_renderer_base.hpp
+++ b/include/mapnik/warning_ignore.hpp
@@ -20,26 +20,17 @@
*
*****************************************************************************/
-#ifndef MAPNIK_GRID_RENDERER_BASE_HPP
-#define MAPNIK_GRID_RENDERER_BASE_HPP
-#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunknown-pragmas" // clang+gcc
+#pragma GCC diagnostic ignored "-Wno-unknown-pragmas" // clang
+#pragma GCC diagnostic ignored "-Wno-pragmas" // gcc
+#pragma GCC diagnostic ignored "-Wno-unsequenced"
+#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-parameter"
+#pragma GCC diagnostic ignored "-Wredeclared-class-member"
+#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#pragma GCC diagnostic ignored "-Wshadow"
+#pragma GCC diagnostic ignored "-Wc++11-narrowing"
#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
-#include "agg_renderer_base.h"
-#include <mapnik/grid/grid_pixel.hpp>
-#pragma GCC diagnostic pop
-#include <mapnik/grid/grid_pixfmt.hpp>
-
-namespace mapnik {
-
-#ifdef BIGINT
-using grid_renderer_base_type = agg::renderer_base<mapnik::pixfmt_gray64>;
-#else
-using grid_renderer_base_type = agg::renderer_base<mapnik::pixfmt_gray32>;
-#endif
-
-}
-
-#endif //MAPNIK_AGG_RASTERIZER_HPP
+#pragma GCC diagnostic ignored "-Wsign-compare"
+#pragma GCC diagnostic ignored "-Wconversion"
\ No newline at end of file
diff --git a/include/mapnik/webp_io.hpp b/include/mapnik/webp_io.hpp
index b16a891..225ff2f 100644
--- a/include/mapnik/webp_io.hpp
+++ b/include/mapnik/webp_io.hpp
@@ -27,9 +27,8 @@
#include <mapnik/image.hpp>
#include <mapnik/util/conversions.hpp>
-// webp
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-function"
+#include <mapnik/warning_ignore.hpp>
extern "C"
{
#include <webp/encode.h>
diff --git a/include/mapnik/wkt/wkt_generator_grammar.hpp b/include/mapnik/wkt/wkt_generator_grammar.hpp
index e4a3969..0c89601 100644
--- a/include/mapnik/wkt/wkt_generator_grammar.hpp
+++ b/include/mapnik/wkt/wkt_generator_grammar.hpp
@@ -29,13 +29,8 @@
#include <mapnik/geometry_type.hpp>
#include <mapnik/geometry_fusion_adapted.hpp>
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/karma.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
#include <boost/math/special_functions/trunc.hpp> // for vc++ and android whose c++11 libs lack std::trunc
diff --git a/include/mapnik/wkt/wkt_grammar.hpp b/include/mapnik/wkt/wkt_grammar.hpp
index 43c5334..a91f436 100644
--- a/include/mapnik/wkt/wkt_grammar.hpp
+++ b/include/mapnik/wkt/wkt_grammar.hpp
@@ -26,12 +26,9 @@
// mapnik
#include <mapnik/geometry.hpp>
#include <mapnik/geometry_fusion_adapted.hpp>
+
#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 <mapnik/warning_ignore.hpp>
#include <boost/assert.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
diff --git a/include/mapnik/xml_attribute_cast.hpp b/include/mapnik/xml_attribute_cast.hpp
index 5140fde..fb3b7eb 100644
--- a/include/mapnik/xml_attribute_cast.hpp
+++ b/include/mapnik/xml_attribute_cast.hpp
@@ -36,9 +36,8 @@
#include <mapnik/attribute.hpp>
#include <mapnik/text/font_feature_settings.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/optional.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/csv/csv_datasource.cpp b/plugins/input/csv/csv_datasource.cpp
index 0a8acb8..d0dbf06 100644
--- a/plugins/input/csv/csv_datasource.cpp
+++ b/plugins/input/csv/csv_datasource.cpp
@@ -43,8 +43,7 @@
#include <mapnik/geom_util.hpp>
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/interprocess/mapped_region.hpp>
#include <boost/interprocess/streams/bufferstream.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/csv/csv_datasource.hpp b/plugins/input/csv/csv_datasource.hpp
index 3faf0cf..ac2482f 100644
--- a/plugins/input/csv/csv_datasource.hpp
+++ b/plugins/input/csv/csv_datasource.hpp
@@ -33,18 +33,13 @@
#include <mapnik/feature_layer_desc.hpp>
#include <mapnik/value_types.hpp>
-// boost
-#include <boost/optional.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-variable"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
+#include <boost/optional.hpp>
#include <boost/version.hpp>
#include <boost/geometry/index/rtree.hpp>
#pragma GCC diagnostic pop
+
// stl
#include <vector>
#include <deque>
diff --git a/plugins/input/csv/csv_featureset.hpp b/plugins/input/csv/csv_featureset.hpp
index e09bd4c..8fbf77b 100644
--- a/plugins/input/csv/csv_featureset.hpp
+++ b/plugins/input/csv/csv_featureset.hpp
@@ -32,8 +32,7 @@
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/interprocess/mapped_region.hpp>
#include <boost/interprocess/streams/bufferstream.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/csv/csv_index_featureset.hpp b/plugins/input/csv/csv_index_featureset.hpp
index a17da59..1a2c637 100644
--- a/plugins/input/csv/csv_index_featureset.hpp
+++ b/plugins/input/csv/csv_index_featureset.hpp
@@ -31,8 +31,7 @@
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/interprocess/mapped_region.hpp>
#include <boost/interprocess/streams/bufferstream.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/csv/csv_utils.hpp b/plugins/input/csv/csv_utils.hpp
index b1894da..43da304 100644
--- a/plugins/input/csv/csv_utils.hpp
+++ b/plugins/input/csv/csv_utils.hpp
@@ -33,11 +33,9 @@
#include <mapnik/csv/csv_grammar.hpp>
#include <mapnik/util/trim.hpp>
#include <mapnik/datasource.hpp>
-// boost
+
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/geojson/geojson_datasource.cpp b/plugins/input/geojson/geojson_datasource.cpp
index 28648c0..b46bf5b 100644
--- a/plugins/input/geojson/geojson_datasource.cpp
+++ b/plugins/input/geojson/geojson_datasource.cpp
@@ -27,14 +27,8 @@
#include <fstream>
#include <algorithm>
-// 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-compare"
-#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/spirit/include/qi.hpp>
#pragma GCC diagnostic pop
@@ -64,8 +58,7 @@
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/interprocess/mapped_region.hpp>
#pragma GCC diagnostic pop
#include <mapnik/mapped_memory_cache.hpp>
diff --git a/plugins/input/geojson/geojson_datasource.hpp b/plugins/input/geojson/geojson_datasource.hpp
index 212796c..66f3383 100644
--- a/plugins/input/geojson/geojson_datasource.hpp
+++ b/plugins/input/geojson/geojson_datasource.hpp
@@ -33,15 +33,9 @@
#include <mapnik/feature_layer_desc.hpp>
#include <mapnik/unicode.hpp>
-// boost
-#include <boost/optional.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-variable"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
+#include <boost/optional.hpp>
#include <boost/version.hpp>
#include <boost/geometry/index/rtree.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/geojson/geojson_index_featureset.hpp b/plugins/input/geojson/geojson_index_featureset.hpp
index 2cd934c..41e8e84 100644
--- a/plugins/input/geojson/geojson_index_featureset.hpp
+++ b/plugins/input/geojson/geojson_index_featureset.hpp
@@ -29,8 +29,7 @@
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/interprocess/mapped_region.hpp>
#include <boost/interprocess/streams/bufferstream.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/ogr/ogr_datasource.cpp b/plugins/input/ogr/ogr_datasource.cpp
index 11f80ea..41c0ebb 100644
--- a/plugins/input/ogr/ogr_datasource.cpp
+++ b/plugins/input/ogr/ogr_datasource.cpp
@@ -34,10 +34,8 @@
#include <mapnik/util/utf_conv_win.hpp>
#include <mapnik/util/trim.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/ogr/ogr_datasource.hpp b/plugins/input/ogr/ogr_datasource.hpp
index f98aebf..0edeae9 100644
--- a/plugins/input/ogr/ogr_datasource.hpp
+++ b/plugins/input/ogr/ogr_datasource.hpp
@@ -40,9 +40,8 @@
#include <vector>
#include <string>
-// ogr
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
+#include <mapnik/warning_ignore.hpp>
#include <ogrsf_frmts.h>
#pragma GCC diagnostic pop
#include "ogr_layer_ptr.hpp"
diff --git a/plugins/input/ogr/ogr_featureset.hpp b/plugins/input/ogr/ogr_featureset.hpp
index ca7a57a..6a594ec 100644
--- a/plugins/input/ogr/ogr_featureset.hpp
+++ b/plugins/input/ogr/ogr_featureset.hpp
@@ -29,9 +29,8 @@
#include <mapnik/unicode.hpp>
#include <mapnik/geom_util.hpp>
-// ogr
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
+#include <mapnik/warning_ignore.hpp>
#include <ogrsf_frmts.h>
#pragma GCC diagnostic pop
diff --git a/plugins/input/ogr/ogr_index_featureset.cpp b/plugins/input/ogr/ogr_index_featureset.cpp
index 348c618..54b91f4 100644
--- a/plugins/input/ogr/ogr_index_featureset.cpp
+++ b/plugins/input/ogr/ogr_index_featureset.cpp
@@ -36,8 +36,7 @@
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
#include <mapnik/mapped_memory_cache.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/interprocess/mapped_region.hpp>
#include <boost/interprocess/streams/bufferstream.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/pgraster/pgraster_datasource.cpp b/plugins/input/pgraster/pgraster_datasource.cpp
index dc3e1a5..451c74e 100644
--- a/plugins/input/pgraster/pgraster_datasource.cpp
+++ b/plugins/input/pgraster/pgraster_datasource.cpp
@@ -38,10 +38,8 @@
#include <mapnik/timer.hpp>
#include <mapnik/value_types.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/tokenizer.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/postgis/postgis_datasource.cpp b/plugins/input/postgis/postgis_datasource.cpp
index bfc006b..d95aa33 100644
--- a/plugins/input/postgis/postgis_datasource.cpp
+++ b/plugins/input/postgis/postgis_datasource.cpp
@@ -35,10 +35,8 @@
#include <mapnik/timer.hpp>
#include <mapnik/value_types.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/tokenizer.hpp>
#include <boost/regex.hpp>
diff --git a/plugins/input/raster/raster_featureset.cpp b/plugins/input/raster/raster_featureset.cpp
index 93f4b8d..26cac96 100644
--- a/plugins/input/raster/raster_featureset.cpp
+++ b/plugins/input/raster/raster_featureset.cpp
@@ -30,10 +30,8 @@
#include <mapnik/feature_factory.hpp>
#include <mapnik/util/variant.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/format.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/shape/dbfile.cpp b/plugins/input/shape/dbfile.cpp
index c26a117..d64d373 100644
--- a/plugins/input/shape/dbfile.cpp
+++ b/plugins/input/shape/dbfile.cpp
@@ -28,13 +28,8 @@
#include "dbfile.hpp"
-// 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 "-Wmissing-field-initializers"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
#include <boost/interprocess/mapped_region.hpp>
diff --git a/plugins/input/shape/dbfile.hpp b/plugins/input/shape/dbfile.hpp
index 6812e54..9ff0224 100644
--- a/plugins/input/shape/dbfile.hpp
+++ b/plugins/input/shape/dbfile.hpp
@@ -27,10 +27,11 @@
#include <mapnik/feature.hpp>
#include <mapnik/util/noncopyable.hpp>
#include <mapnik/unicode.hpp>
+
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
#include <mapnik/mapped_memory_cache.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
+#include <mapnik/warning_ignore.hpp>
#include <boost/interprocess/streams/bufferstream.hpp>
#pragma GCC diagnostic pop
#endif
diff --git a/plugins/input/shape/shape_datasource.cpp b/plugins/input/shape/shape_datasource.cpp
index f2a5160..644e601 100644
--- a/plugins/input/shape/shape_datasource.cpp
+++ b/plugins/input/shape/shape_datasource.cpp
@@ -24,11 +24,9 @@
#include "shape_featureset.hpp"
#include "shape_index_featureset.hpp"
-// boost
-#include <boost/version.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
+#include <boost/version.hpp>
#include <boost/algorithm/string.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/shape/shape_index_featureset.cpp b/plugins/input/shape/shape_index_featureset.cpp
index e352efd..f91d7ac 100644
--- a/plugins/input/shape/shape_index_featureset.cpp
+++ b/plugins/input/shape/shape_index_featureset.cpp
@@ -27,15 +27,14 @@
#include <mapnik/debug.hpp>
#include <mapnik/feature_factory.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
#include <boost/interprocess/streams/bufferstream.hpp>
#endif
#pragma GCC diagnostic pop
+
#include "shape_index_featureset.hpp"
#include "shape_utils.hpp"
#include <mapnik/util/spatial_index.hpp>
diff --git a/plugins/input/shape/shape_utils.cpp b/plugins/input/shape/shape_utils.cpp
index af7aa53..40d8fc6 100644
--- a/plugins/input/shape/shape_utils.cpp
+++ b/plugins/input/shape/shape_utils.cpp
@@ -26,10 +26,8 @@
#include <mapnik/util/conversions.hpp>
#include "shape_utils.hpp"
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/shape/shapefile.hpp b/plugins/input/shape/shapefile.hpp
index 1c61df0..664dc88 100644
--- a/plugins/input/shape/shapefile.hpp
+++ b/plugins/input/shape/shapefile.hpp
@@ -33,10 +33,10 @@
#include <mapnik/global.hpp>
#include <mapnik/util/utf_conv_win.hpp>
#include <mapnik/box2d.hpp>
+
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/interprocess/mapped_region.hpp>
#include <boost/interprocess/streams/bufferstream.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/sqlite/sqlite_connection.hpp b/plugins/input/sqlite/sqlite_connection.hpp
index 27a2fe2..c87086d 100644
--- a/plugins/input/sqlite/sqlite_connection.hpp
+++ b/plugins/input/sqlite/sqlite_connection.hpp
@@ -32,10 +32,8 @@
#include <mapnik/params.hpp>
#include <mapnik/timer.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/sqlite/sqlite_utils.hpp b/plugins/input/sqlite/sqlite_utils.hpp
index c96f640..959e3f7 100644
--- a/plugins/input/sqlite/sqlite_utils.hpp
+++ b/plugins/input/sqlite/sqlite_utils.hpp
@@ -38,10 +38,8 @@
#include <mapnik/geometry_is_empty.hpp>
#include <mapnik/geometry_envelope.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#pragma GCC diagnostic pop
diff --git a/plugins/input/topojson/topojson_datasource.hpp b/plugins/input/topojson/topojson_datasource.hpp
index 214d40e..ebc92ae 100644
--- a/plugins/input/topojson/topojson_datasource.hpp
+++ b/plugins/input/topojson/topojson_datasource.hpp
@@ -33,15 +33,10 @@
#include <mapnik/feature_layer_desc.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/json/topology.hpp>
-// boost
-#include <boost/optional.hpp>
+
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-variable"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
+#include <boost/optional.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry.hpp>
#include <boost/version.hpp>
diff --git a/plugins/input/topojson/topojson_featureset.cpp b/plugins/input/topojson/topojson_featureset.cpp
index b82304b..9e7c23e 100644
--- a/plugins/input/topojson/topojson_featureset.cpp
+++ b/plugins/input/topojson/topojson_featureset.cpp
@@ -33,11 +33,8 @@
#include <vector>
#include <fstream>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-variable"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/range/adaptor/reversed.hpp>
#pragma GCC diagnostic pop
diff --git a/src/box2d.cpp b/src/box2d.cpp
index a39857d..0e60a38 100644
--- a/src/box2d.cpp
+++ b/src/box2d.cpp
@@ -29,12 +29,10 @@
#include <sstream>
#include <iomanip>
-// boost
+#include <mapnik/config.hpp>
+
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/fusion/include/adapt_adt.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/support_adapt_adt_attributes.hpp>
diff --git a/src/color.cpp b/src/color.cpp
index b385877..2dcbe76 100644
--- a/src/color.cpp
+++ b/src/color.cpp
@@ -28,13 +28,8 @@
// agg
#include "agg_color_rgba.h"
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/karma.hpp>
#include <boost/spirit/include/phoenix_statement.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
diff --git a/src/conversions.cpp b/src/conversions.cpp
index 995d0f4..04bfc57 100644
--- a/src/conversions.cpp
+++ b/src/conversions.cpp
@@ -31,11 +31,7 @@
#define MAPNIK_KARMA_TO_STRING
#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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#ifdef MAPNIK_KARMA_TO_STRING
#include <boost/spirit/include/karma.hpp>
diff --git a/src/dasharray_parser.cpp b/src/dasharray_parser.cpp
index 4899319..760caea 100644
--- a/src/dasharray_parser.cpp
+++ b/src/dasharray_parser.cpp
@@ -24,10 +24,7 @@
#include <mapnik/util/dasharray_parser.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
diff --git a/src/datasource_cache.cpp b/src/datasource_cache.cpp
index f412446..c712f4a 100644
--- a/src/datasource_cache.cpp
+++ b/src/datasource_cache.cpp
@@ -29,10 +29,8 @@
#include <mapnik/plugin.hpp>
#include <mapnik/util/fs.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/predicate.hpp>
#pragma GCC diagnostic pop
diff --git a/src/expression_node.cpp b/src/expression_node.cpp
index 43a4059..377d091 100644
--- a/src/expression_node.cpp
+++ b/src/expression_node.cpp
@@ -26,7 +26,7 @@
#include <mapnik/safe_cast.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#if defined(BOOST_REGEX_HAS_ICU)
#include <boost/regex/icu.hpp>
#else
diff --git a/src/font_engine_freetype.cpp b/src/font_engine_freetype.cpp
index 8f62842..b0f1374 100644
--- a/src/font_engine_freetype.cpp
+++ b/src/font_engine_freetype.cpp
@@ -30,10 +30,8 @@
#include <mapnik/util/singleton.hpp>
#include <mapnik/make_unique.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/optional.hpp>
#pragma GCC diagnostic pop
diff --git a/src/image_compositing.cpp b/src/image_compositing.cpp
index 83684e4..12633cb 100644
--- a/src/image_compositing.cpp
+++ b/src/image_compositing.cpp
@@ -27,12 +27,8 @@
#include <mapnik/safe_cast.hpp>
#include <mapnik/util/const_rendering_buffer.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wredeclared-class-member"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/bimap.hpp>
#pragma GCC diagnostic pop
diff --git a/src/image_filter_types.cpp b/src/image_filter_types.cpp
index 2212db9..6755757 100644
--- a/src/image_filter_types.cpp
+++ b/src/image_filter_types.cpp
@@ -24,14 +24,8 @@
#include <mapnik/image_filter_grammar.hpp>
#include <mapnik/image_filter_grammar_impl.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/karma.hpp>
#pragma GCC diagnostic pop
diff --git a/src/image_options.cpp b/src/image_options.cpp
index 3b1b1fe..bbcb6c9 100644
--- a/src/image_options.cpp
+++ b/src/image_options.cpp
@@ -23,11 +23,7 @@
#include <mapnik/image_options.hpp>
#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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/fusion/include/std_pair.hpp>
#pragma GCC diagnostic pop
diff --git a/src/image_scaling.cpp b/src/image_scaling.cpp
index dd3dceb..63bb88c 100644
--- a/src/image_scaling.cpp
+++ b/src/image_scaling.cpp
@@ -29,10 +29,7 @@
// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wredeclared-class-member"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/bimap.hpp>
#pragma GCC diagnostic pop
diff --git a/src/jpeg_reader.cpp b/src/jpeg_reader.cpp
index 4a6284c..84c805e 100644
--- a/src/jpeg_reader.cpp
+++ b/src/jpeg_reader.cpp
@@ -30,9 +30,8 @@ extern "C"
#include <jpeglib.h>
}
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/iostreams/device/file.hpp>
#include <boost/iostreams/device/array.hpp>
#include <boost/iostreams/stream.hpp>
diff --git a/src/mapped_memory_cache.cpp b/src/mapped_memory_cache.cpp
index 00ad963..db4fce8 100644
--- a/src/mapped_memory_cache.cpp
+++ b/src/mapped_memory_cache.cpp
@@ -27,11 +27,9 @@
#include <mapnik/util/fs.hpp>
#include <mapnik/mapped_memory_cache.hpp>
-// boost
-#include <boost/assert.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
+#include <boost/assert.hpp>
#include <boost/interprocess/mapped_region.hpp>
#include <boost/interprocess/file_mapping.hpp>
#pragma GCC diagnostic pop
diff --git a/src/marker_cache.cpp b/src/marker_cache.cpp
index 330f4d0..6641218 100644
--- a/src/marker_cache.cpp
+++ b/src/marker_cache.cpp
@@ -33,10 +33,8 @@
#include <mapnik/image_reader.hpp>
#include <mapnik/util/fs.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/assert.hpp>
#include <boost/algorithm/string.hpp>
#pragma GCC diagnostic pop
diff --git a/src/miniz_png.cpp b/src/miniz_png.cpp
index fb26585..746cffa 100644
--- a/src/miniz_png.cpp
+++ b/src/miniz_png.cpp
@@ -31,8 +31,7 @@
#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
extern "C" {
#include "miniz.c"
}
diff --git a/src/png_reader.cpp b/src/png_reader.cpp
index 03968c0..30b470f 100644
--- a/src/png_reader.cpp
+++ b/src/png_reader.cpp
@@ -28,9 +28,9 @@ extern "C"
{
#include <png.h>
}
-// boost
+
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/iostreams/device/file.hpp>
#include <boost/iostreams/device/array.hpp>
#include <boost/iostreams/stream.hpp>
diff --git a/src/save_map.cpp b/src/save_map.cpp
index 7ba9757..b8db98a 100644
--- a/src/save_map.cpp
+++ b/src/save_map.cpp
@@ -48,16 +48,14 @@
#include <mapnik/util/variant.hpp>
#include <mapnik/util/variant_io.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
-#pragma GCC diagnostic ignored "-Wsign-conversion"
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
-#pragma GCC diagnostic pop
#include <boost/optional.hpp>
#include <boost/version.hpp>
+#pragma GCC diagnostic pop
// stl
#include <iostream>
diff --git a/src/simplify.cpp b/src/simplify.cpp
index 97eae92..51a5dfe 100644
--- a/src/simplify.cpp
+++ b/src/simplify.cpp
@@ -1,12 +1,8 @@
// mapnik
#include <mapnik/simplify.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wredeclared-class-member"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/bimap.hpp>
#pragma GCC diagnostic pop
diff --git a/src/svg/output/svg_generator.cpp b/src/svg/output/svg_generator.cpp
index 4196961..cb8eb79 100644
--- a/src/svg/output/svg_generator.cpp
+++ b/src/svg/output/svg_generator.cpp
@@ -27,13 +27,8 @@
#include <mapnik/util/conversions.hpp>
#include <mapnik/svg/output/svg_output_grammars.hpp>
-// 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 <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/karma.hpp>
#pragma GCC diagnostic pop
diff --git a/src/svg/svg_parser.cpp b/src/svg/svg_parser.cpp
index af02a71..5885e8d 100644
--- a/src/svg/svg_parser.cpp
+++ b/src/svg/svg_parser.cpp
@@ -35,15 +35,12 @@
#include "agg_color_rgba.h"
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
#include <boost/fusion/include/std_pair.hpp>
#include <boost/algorithm/string/predicate.hpp>
-// rapidxml
#include <boost/property_tree/detail/xml_parser_read_rapidxml.hpp>
#pragma GCC diagnostic pop
diff --git a/src/text/font_feature_settings.cpp b/src/text/font_feature_settings.cpp
index 581c085..81a62f9 100644
--- a/src/text/font_feature_settings.cpp
+++ b/src/text/font_feature_settings.cpp
@@ -24,16 +24,13 @@
#include <mapnik/text/font_feature_settings.hpp>
#include <mapnik/config_error.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/version.hpp>
#pragma GCC diagnostic pop
+
// stl
#include <algorithm>
#include <cctype>
diff --git a/src/text/placements/simple.cpp b/src/text/placements/simple.cpp
index 493da3f..800a3d3 100644
--- a/src/text/placements/simple.cpp
+++ b/src/text/placements/simple.cpp
@@ -30,14 +30,8 @@
#include <mapnik/symbolizer.hpp>
#include <mapnik/expression_string.hpp>
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#pragma GCC diagnostic ignored "-Wconversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_stl.hpp>
diff --git a/src/tiff_reader.cpp b/src/tiff_reader.cpp
index dbafdf0..37e59b5 100644
--- a/src/tiff_reader.cpp
+++ b/src/tiff_reader.cpp
@@ -29,9 +29,8 @@ extern "C"
#include <tiffio.h>
}
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/iostreams/device/file.hpp>
#include <boost/iostreams/device/array.hpp>
#include <boost/iostreams/stream.hpp>
diff --git a/src/webp_reader.cpp b/src/webp_reader.cpp
index fbd0460..c806df9 100644
--- a/src/webp_reader.cpp
+++ b/src/webp_reader.cpp
@@ -25,18 +25,14 @@
#include <mapnik/debug.hpp>
#include <mapnik/image_reader.hpp>
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic push
+#include <mapnik/warning_ignore.hpp>
extern "C"
{
#include <webp/types.h>
#include <webp/decode.h>
}
-#pragma clang diagnostic pop
-// boost
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
#include <boost/iostreams/device/file.hpp>
#include <boost/iostreams/device/array.hpp>
#include <boost/iostreams/stream.hpp>
diff --git a/test/unit/datasource/csv.cpp b/test/unit/datasource/csv.cpp
index 75da910..72e8719 100644
--- a/test/unit/datasource/csv.cpp
+++ b/test/unit/datasource/csv.cpp
@@ -36,10 +36,8 @@
#include <boost/format.hpp>
#include <boost/optional/optional_io.hpp>
-
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#pragma GCC diagnostic pop
@@ -65,7 +63,7 @@ void add_csv_files(std::string dir, std::vector<std::string> &csv_files)
}
}
-mapnik::datasource_ptr get_csv_ds(std::string const &file_name, bool strict = true)
+mapnik::datasource_ptr get_csv_ds(std::string const& file_name, bool strict = true, std::string const& base="")
{
mapnik::parameters params;
params["type"] = std::string("csv");
@@ -132,6 +130,10 @@ TEST_CASE("csv") {
params["type"] = "csv";
params["file"] = filename;
REQUIRE_THROWS(mapnik::datasource_cache::instance().create(params));
+ params["base"] = "";
+ REQUIRE_THROWS(mapnik::datasource_cache::instance().create(params));
+ params["base"] = "/";
+ REQUIRE_THROWS(mapnik::datasource_cache::instance().create(params));
}
}
@@ -270,21 +272,24 @@ TEST_CASE("csv") {
{
for (auto create_index : { false, true })
{
- std::string filename = "test/data/csv/nypd.csv";
+ std::string base = "test/data/csv/";
+ std::string filename = "nypd.csv";
+ std::string filepath = base + filename;
// cleanup in the case of a failed previous run
- if (mapnik::util::exists(filename + ".index"))
+ if (mapnik::util::exists(filepath + ".index"))
{
- mapnik::util::remove(filename + ".index");
+ mapnik::util::remove(filepath + ".index");
}
if (create_index)
{
- int ret = create_disk_index(filename);
+ int ret = create_disk_index(filepath);
int ret_posix = (ret >> 8) & 0x000000ff;
INFO(ret);
INFO(ret_posix);
- CHECK(mapnik::util::exists(filename + ".index"));
+ CHECK(mapnik::util::exists(filepath + ".index"));
}
- auto ds = get_csv_ds(filename);
+ auto ds = get_csv_ds(filepath,true,base);
+ CHECK(ds->type() == mapnik::datasource::datasource_t::Vector);
auto fields = ds->get_descriptor().get_descriptors();
require_field_names(fields, {"Precinct", "Phone", "Address", "City", "geo_longitude", "geo_latitude", "geo_accuracy"});
require_field_types(fields, {mapnik::String, mapnik::String, mapnik::String, mapnik::String, mapnik::Double, mapnik::Double, mapnik::String});
@@ -292,8 +297,14 @@ TEST_CASE("csv") {
CHECK(ds->get_geometry_type() == mapnik::datasource_geometry_t::Point);
CHECK(count_features(all_features(ds)) == 2);
- auto feature = all_features(ds)->next();
- require_attributes(feature, {
+ auto fs = all_features(ds);
+ auto fs2 = ds->features_at_point(ds->envelope().center(),10000);
+ REQUIRE(fs != nullptr);
+ auto feature = fs->next();
+ auto feature2 = fs2->next();
+ REQUIRE(feature != nullptr);
+ REQUIRE(feature2 != nullptr);
+ auto expected_attr = {
attr { "City", mapnik::value_unicode_string("New York, NY") }
, attr { "geo_accuracy", mapnik::value_unicode_string("house") }
, attr { "Phone", mapnik::value_unicode_string("(212) 334-0711") }
@@ -301,10 +312,12 @@ TEST_CASE("csv") {
, attr { "Precinct", mapnik::value_unicode_string("5th Precinct") }
, attr { "geo_longitude", mapnik::value_integer(-70) }
, attr { "geo_latitude", mapnik::value_integer(40) }
- });
- if (mapnik::util::exists(filename + ".index"))
+ };
+ require_attributes(feature, expected_attr);
+ require_attributes(feature2, expected_attr);
+ if (mapnik::util::exists(filepath + ".index"))
{
- mapnik::util::remove(filename + ".index");
+ mapnik::util::remove(filepath + ".index");
}
}
} // END SECTION
diff --git a/test/unit/datasource/geojson.cpp b/test/unit/datasource/geojson.cpp
index cd9edce..785d669 100644
--- a/test/unit/datasource/geojson.cpp
+++ b/test/unit/datasource/geojson.cpp
@@ -125,7 +125,7 @@ TEST_CASE("geojson") {
}
}
- SECTION("GeoJSON Point ")
+ SECTION("GeoJSON Point")
{
for (auto cache_features : {true, false})
{
@@ -436,10 +436,55 @@ TEST_CASE("geojson") {
}
}
+ SECTION("GeoJSON ensure mapnik::datasource_cache::instance().create() throws on malformed input")
+ {
+ mapnik::parameters params;
+ params["type"] = "geojson";
+
+ for (auto const& c_str : {"./test/data/json/feature-malformed-1.geojson",
+ "./test/data/json/feature-malformed-2.geojson",
+ "./test/data/json/feature-malformed-3.geojson"})
+ {
+ std::string filename(c_str);
+ params["file"] = filename; // mismatched parentheses
+
+ // cleanup in the case of a failed previous run
+ if (mapnik::util::exists(filename + ".index"))
+ {
+ mapnik::util::remove(filename + ".index");
+ }
+
+ for (auto create_index : { true, false })
+ {
+ if (create_index)
+ {
+ CHECK(!mapnik::util::exists(filename + ".index"));
+ int ret = create_disk_index(filename);
+ int ret_posix = (ret >> 8) & 0x000000ff;
+ INFO(ret);
+ INFO(ret_posix);
+ CHECK(!mapnik::util::exists(filename + ".index"));
+ }
+
+ for (auto cache_features : {true, false})
+ {
+ CHECK_THROWS(mapnik::datasource_cache::instance().create(params));
+ }
+
+ // cleanup
+ if (create_index && mapnik::util::exists(filename + ".index"))
+ {
+ mapnik::util::remove(filename + ".index");
+ }
+ }
+ }
+ }
+
SECTION("GeoJSON ensure input fully consumed and throw exception otherwise")
{
mapnik::parameters params;
params["type"] = "geojson";
+
std::string filename("./test/data/json/points-malformed.geojson");
params["file"] = filename; // mismatched parentheses
diff --git a/test/unit/geometry/geometry_equal.hpp b/test/unit/geometry/geometry_equal.hpp
index 6b5dc68..cb4a30d 100644
--- a/test/unit/geometry/geometry_equal.hpp
+++ b/test/unit/geometry/geometry_equal.hpp
@@ -5,8 +5,7 @@
#include <iterator>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/iterator/zip_iterator.hpp>
#include <boost/range/iterator_range.hpp>
diff --git a/test/unit/vertex_adapter/clipping_test.cpp b/test/unit/vertex_adapter/clipping_test.cpp
index e2e0abd..29a3e42 100644
--- a/test/unit/vertex_adapter/clipping_test.cpp
+++ b/test/unit/vertex_adapter/clipping_test.cpp
@@ -4,10 +4,9 @@
#include <mapnik/util/conversions.hpp>
#include <mapnik/util/trim.hpp>
#include <mapnik/path.hpp>
-// boost
+
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#pragma GCC diagnostic pop
diff --git a/test/unit/vertex_adapter/offset_converter.cpp b/test/unit/vertex_adapter/offset_converter.cpp
index 7855c60..8c2780d 100644
--- a/test/unit/vertex_adapter/offset_converter.cpp
+++ b/test/unit/vertex_adapter/offset_converter.cpp
@@ -29,11 +29,7 @@ struct fake_path
template <typename Itr>
fake_path(Itr itr, size_t sz, bool make_invalid = false) {
size_t num_coords = sz >> 1;
- if (make_invalid)
- {
- num_coords++;
- }
- vertices_.reserve(num_coords);
+ vertices_.reserve(num_coords + (make_invalid ? 1 : 0));
if (make_invalid)
{
vertices_.push_back(std::make_tuple(0,0,mapnik::SEG_END));
diff --git a/test/visual/map_sizes_grammar.hpp b/test/visual/map_sizes_grammar.hpp
index 10d3350..2c79d90 100644
--- a/test/visual/map_sizes_grammar.hpp
+++ b/test/visual/map_sizes_grammar.hpp
@@ -23,13 +23,8 @@
#ifndef MAP_SIZES_GRAMMAR_HPP
#define MAP_SIZES_GRAMMAR_HPP
-// 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 "-Wmissing-field-initializers"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix.hpp>
#pragma GCC diagnostic pop
diff --git a/utils/mapnik-index/build.py b/utils/mapnik-index/build.py
index 39bc00e..341c4b8 100644
--- a/utils/mapnik-index/build.py
+++ b/utils/mapnik-index/build.py
@@ -41,6 +41,8 @@ headers = env['CPPPATH']
boost_program_options = 'boost_program_options%s' % env['BOOST_APPEND']
boost_system = 'boost_system%s' % env['BOOST_APPEND']
libraries = [env['MAPNIK_NAME'], boost_program_options, boost_system]
+# need on linux: https://github.com/mapnik/mapnik/issues/3145
+libraries.append(env['ICU_LIB_NAME'])
libraries.append('mapnik-json')
libraries.append('mapnik-wkt')
diff --git a/utils/mapnik-index/mapnik-index.cpp b/utils/mapnik-index/mapnik-index.cpp
index bceaa64..a19b1f1 100644
--- a/utils/mapnik-index/mapnik-index.cpp
+++ b/utils/mapnik-index/mapnik-index.cpp
@@ -30,9 +30,9 @@
#include "process_csv_file.hpp"
#include "process_geojson_file.hpp"
+
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/program_options.hpp>
#pragma GCC diagnostic pop
diff --git a/utils/mapnik-index/process_csv_file.cpp b/utils/mapnik-index/process_csv_file.cpp
index c7b18a0..908ec9a 100644
--- a/utils/mapnik-index/process_csv_file.cpp
+++ b/utils/mapnik-index/process_csv_file.cpp
@@ -27,8 +27,7 @@
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/interprocess/mapped_region.hpp>
#include <boost/interprocess/streams/bufferstream.hpp>
#pragma GCC diagnostic pop
diff --git a/utils/mapnik-index/process_geojson_file.cpp b/utils/mapnik-index/process_geojson_file.cpp
index 9a9ee93..1ca0be7 100644
--- a/utils/mapnik-index/process_geojson_file.cpp
+++ b/utils/mapnik-index/process_geojson_file.cpp
@@ -29,10 +29,7 @@
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+#include <mapnik/warning_ignore.hpp>
#include <boost/interprocess/mapped_region.hpp>
#include <boost/interprocess/streams/bufferstream.hpp>
#include <boost/spirit/include/qi.hpp>
@@ -88,7 +85,7 @@ std::pair<bool,box2d<double>> process_geojson_file(T & boxes, std::string const&
{
if (!boost::spirit::qi::phrase_parse(start, end, (geojson_datasource_static_bbox_grammar)(boost::phoenix::ref(boxes)) , space))
{
- std::clog << "mapnik-index (GeoJSON) : could extract bounding boxes from : '" << filename << "'";
+ std::clog << "mapnik-index (GeoJSON) : could not extract bounding boxes from : '" << filename << "'" << std::endl;
return std::make_pair(false, extent);
}
}
diff --git a/utils/mapnik-render/mapnik-render.cpp b/utils/mapnik-render/mapnik-render.cpp
index e223cf0..0ed950c 100644
--- a/utils/mapnik-render/mapnik-render.cpp
+++ b/utils/mapnik-render/mapnik-render.cpp
@@ -9,8 +9,7 @@
#include <mapnik/font_engine_freetype.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/program_options.hpp>
#pragma GCC diagnostic pop
diff --git a/utils/pgsql2sqlite/pgsql2sqlite.hpp b/utils/pgsql2sqlite/pgsql2sqlite.hpp
index f188e08..e339a8f 100644
--- a/utils/pgsql2sqlite/pgsql2sqlite.hpp
+++ b/utils/pgsql2sqlite/pgsql2sqlite.hpp
@@ -35,10 +35,8 @@
#include "connection_manager.hpp"
#include "cursorresultset.hpp"
-// boost
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#pragma GCC diagnostic pop
diff --git a/utils/shapeindex/shapeindex.cpp b/utils/shapeindex/shapeindex.cpp
index 2e03180..5555c20 100644
--- a/utils/shapeindex/shapeindex.cpp
+++ b/utils/shapeindex/shapeindex.cpp
@@ -30,8 +30,7 @@
#include "shape_io.hpp"
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/program_options.hpp>
#pragma GCC diagnostic pop
diff --git a/utils/svg2png/svg2png.cpp b/utils/svg2png/svg2png.cpp
index 582e5e5..8e855fd 100644
--- a/utils/svg2png/svg2png.cpp
+++ b/utils/svg2png/svg2png.cpp
@@ -35,8 +35,7 @@
#include <mapnik/svg/svg_path_attributes.hpp>
#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wunused-local-typedef"
+#include <mapnik/warning_ignore.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/program_options.hpp>
#pragma GCC diagnostic pop
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapnik.git
More information about the Pkg-grass-devel
mailing list