if 'maximum-extent' is provided, clip map query extent to it allowing one simple and fast way of controlling out of bounds coordinates when projecting into/from layer projection - see also solution at #549

This commit is contained in:
Dane Springmeyer 2011-04-15 07:13:08 +00:00
parent 3147e2a257
commit fd54be4cc5

View file

@ -148,6 +148,13 @@ private:
{
box2d<double> ext = m_.get_buffered_extent();
// clip buffered extent by maximum extent, if supplied
boost::optional<box2d<double> > const& maximum_extent = m_.maximum_extent();
if (maximum_extent) {
ext.clip(*maximum_extent);
}
projection proj1(lay.srs());
proj_transform prj_trans(proj0,proj1);