avoid copying unbuffered bbox

This commit is contained in:
Dane Springmeyer 2012-03-22 16:35:33 -07:00
parent 2e2bce3126
commit 61c38d0ec7

View file

@ -248,9 +248,11 @@ void feature_style_processor<Processor>::apply_to_layer(layer const& lay, Proces
layer_ext.clip(map_ext);
// forward project layer extent back into native projection
if (!prj_trans.forward(layer_ext, PROJ_ENVELOPE_POINTS))
{
std::clog << "WARNING: layer " << lay.name()
<< " extent " << layer_ext << " in map projection "
<< " did not reproject properly back to layer projection\n";
}
}
else
{
@ -262,14 +264,13 @@ void feature_style_processor<Processor>::apply_to_layer(layer const& lay, Proces
}
box2d<double> query_ext = m_.get_current_extent();
box2d<double> unbuffered_extent = m_.get_current_extent();
prj_trans.forward(query_ext, PROJ_ENVELOPE_POINTS);
double qw = query_ext.width()>0 ? query_ext.width() : 1;
double qh = query_ext.height()>0 ? query_ext.height() : 1;
query::resolution_type res(m_.width()/qw,
m_.height()/qh);
query q(layer_ext,res,scale_denom,unbuffered_extent);
query q(layer_ext,res,scale_denom,m_.get_current_extent());
p.start_layer_processing(lay, query_ext);
std::vector<feature_type_style*> active_styles;
attribute_collector collector(names);