From 0f3eecbe5eecb86f1baa669ca7be45294d0cc94f Mon Sep 17 00:00:00 2001 From: Jiri Drbalek Date: Tue, 27 Sep 2016 20:23:45 +0000 Subject: [PATCH] fix intersecting extents in different projections --- include/mapnik/feature_style_processor_impl.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/mapnik/feature_style_processor_impl.hpp b/include/mapnik/feature_style_processor_impl.hpp index 89e0c3a6d..2fea9d8b3 100644 --- a/include/mapnik/feature_style_processor_impl.hpp +++ b/include/mapnik/feature_style_processor_impl.hpp @@ -266,6 +266,7 @@ void feature_style_processor::prepare_layer(layer_rendering_material } box2d layer_ext = lay.envelope(); + const box2d buffered_query_ext_map_srs = buffered_query_ext; bool fw_success = false; bool early_return = false; @@ -281,9 +282,9 @@ void feature_style_processor::prepare_layer(layer_rendering_material early_return = true; } // next try intersection of layer extent back projected into map srs - else if (prj_trans.backward(layer_ext, PROJ_ENVELOPE_POINTS) && buffered_query_ext.intersects(layer_ext)) + else if (prj_trans.backward(layer_ext, PROJ_ENVELOPE_POINTS) && buffered_query_ext_map_srs.intersects(layer_ext)) { - layer_ext.clip(buffered_query_ext); + layer_ext.clip(buffered_query_ext_map_srs); // forward project layer extent back into native projection if (! prj_trans.forward(layer_ext, PROJ_ENVELOPE_POINTS)) {