artemp/trac2github — Issue #128: BBox clipping fails when there's no intersection
Author: artemp
Created: 2011-10-09 20:15:01+00:00
State: open
Labels: Core_Library

When Mapnik is processing layers, it tries to clip the map bbox to the
layer extent... unfortunately it doesn't test for intersection first,
so the "clipped" bbox is completely bogus. The layer is then asked for
features for this bbox, and if you have a lot of small raster layers
then this has a big performance impact.

I've attached a patch that fixes this, and also returns something
slightly more sensible from Envelope.intersects in the same situation.