Merge remote-tracking branch 'origin/master'

Conflicts:
	src/feature_style_processor.cpp
This commit is contained in:
Artem Pavlenko 2012-01-10 21:38:43 +00:00 committed by Artem Pavlenko
commit ec8661b5d4
2 changed files with 34 additions and 6 deletions

View file

@ -45,21 +45,37 @@ private:
resolution_type resolution_;
double scale_denominator_;
double filter_factor_;
box2d<double> unbuffered_bbox_;
std::set<std::string> names_;
public:
query(box2d<double> const& bbox, resolution_type const& resolution, double scale_denominator = 1.0)
query(box2d<double> const& bbox,
resolution_type const& resolution,
double scale_denominator,
box2d<double> const& unbuffered_bbox)
: bbox_(bbox),
resolution_(resolution),
scale_denominator_(scale_denominator),
filter_factor_(1.0)
filter_factor_(1.0),
unbuffered_bbox_(unbuffered_bbox)
{}
query(box2d<double> const& bbox,
resolution_type const& resolution,
double scale_denominator = 1.0)
: bbox_(bbox),
resolution_(resolution),
scale_denominator_(scale_denominator),
filter_factor_(1.0),
unbuffered_bbox_(bbox)
{}
query(box2d<double> const& bbox)
: bbox_(bbox),
resolution_(resolution_type(1.0,1.0)),
scale_denominator_(1.0),
filter_factor_(1.0)
filter_factor_(1.0),
unbuffered_bbox_(bbox)
{}
query(query const& other)
@ -67,6 +83,7 @@ public:
resolution_(other.resolution_),
scale_denominator_(other.scale_denominator_),
filter_factor_(other.filter_factor_),
unbuffered_bbox_(other.unbuffered_bbox_),
names_(other.names_)
{}
@ -78,6 +95,7 @@ public:
scale_denominator_=other.scale_denominator_;
filter_factor_=other.filter_factor_;
names_=other.names_;
unbuffered_bbox_=other.unbuffered_bbox_;
return *this;
}
@ -96,6 +114,16 @@ public:
return bbox_;
}
box2d<double> const& get_unbuffered_bbox() const
{
return unbuffered_bbox_;
}
void set_unbuffered_bbox(const box2d<double>& bbox)
{
unbuffered_bbox_ = bbox;
}
void set_bbox(const box2d<double>& bbox)
{
bbox_ = bbox;

View file

@ -262,11 +262,12 @@ 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);
query::resolution_type res(m_.width()/query_ext.width(),
m_.height()/query_ext.height());
query q(layer_ext,res,scale_denom);
query q(layer_ext,res,scale_denom,unbuffered_extent);
std::vector<feature_type_style*> active_styles;
attribute_collector collector(names);
@ -557,7 +558,6 @@ void feature_style_processor<Processor>::render_style(
s << "percent rendered: " << perc_processed << "% - " << feature_processed_count
<< " rendered for " << feature_count << " queried for ";
s << std::setw(15 - (int)s.tellp()) << " layer '" << lay.name() << "' and style '" << style_name << "'\n";
}
else
{