+ applied patch avoid_extent from rcoup

This commit is contained in:
Artem Pavlenko 2008-11-19 21:50:12 +00:00
parent f1c1e475d7
commit 6062f42bbe
3 changed files with 35 additions and 20 deletions

View file

@ -110,9 +110,11 @@ namespace mapnik
if (ds)
{
Envelope<double> const& ext=m_.getCurrentExtent();
Envelope<double> bbox(ext);
projection proj1(lay.srs());
proj_transform prj_trans(proj0,proj1);
if (proj0 != proj1) {
Envelope<double> layer_ext = lay.envelope();
double lx0 = layer_ext.minx();
double ly0 = layer_ext.miny();
@ -131,7 +133,8 @@ namespace mapnik
prj_trans.forward(lx0,ly0,lz0);
prj_trans.forward(lx1,ly1,lz1);
Envelope<double> bbox(lx0,ly0,lx1,ly1);
bbox = Envelope<double>(lx0,ly0,lx1,ly1);
}
double resolution = m_.getWidth()/bbox.width();
query q(bbox,resolution); //BBOX query

View file

@ -57,6 +57,8 @@ namespace mapnik {
~projection();
projection& operator=(projection const& rhs);
bool operator==(const projection& other) const;
bool operator!=(const projection& other) const;
bool is_initialized() const;
bool is_geographic() const;
std::string const& params() const;

View file

@ -53,6 +53,16 @@ namespace mapnik {
return *this;
}
bool projection::operator==(const projection& other) const
{
return (params_ == other.params_);
}
bool projection::operator!=(const projection& other) const
{
return !(*this == other);
}
bool projection::is_initialized() const
{
return proj_ ? true : false;