fix typo (map_ext.intersects(map_ext) -> map_ext.intersects(layer_ext)) and add small optimization so that if projections are equal we don't check intersection twice before returning no hit

This commit is contained in:
Dane Springmeyer 2011-07-21 21:14:06 +00:00
parent 572da8766f
commit c5c729b17c

View file

@ -234,8 +234,13 @@ private:
{
layer_ext.clip(map_ext);
}
// if no intersection and projections are also equal, early return
else if (prj_trans.equal())
{
return;
}
// fallback to back projecting layer into map srs
else if (prj_trans.backward(layer_ext) && map_ext.intersects(map_ext))
else if (prj_trans.backward(layer_ext) && map_ext.intersects(layer_ext))
{
layer_ext.clip(map_ext);
// forward project layer extent back into native projection