''

def renderArea(self, width, height, srs, xmin, ymin, xmax, ymax, zoom):

    start_time = time()
    if global_mapnik_lock.acquire():
        try:
            if (self.mapnik is None):
                self.mapnik = get_mapnikMap(self.mapfile)
                logging.debug('TileStache.Mapnik.ImageProvider.renderArea()    %.3f    to    load    %s', (time() - start_time), self.mapfile)
            self.mapnik.width = width
            self.mapnik.height = height
            self.mapnik.zoom_to_box(Box2d(xmin, ymin, xmax, ymax))
            img = mapnik.Image(width, height)
            if (self.scale_factor is None):
                mapnik.render(self.mapnik, img)
            else:
                mapnik.render(self.mapnik, img, self.scale_factor)
        except:
            self.mapnik = None
            raise
        finally:
            global_mapnik_lock.release()
    if hasattr(Image, 'frombytes'):
        img = Image.frombytes('RGBA', (width, height), img.tostring())
    else:
        img = Image.fromstring('RGBA', (width, height), img.tostring())
    logging.debug('TileStache.Mapnik.ImageProvider.renderArea()    %dx%d    in    %.3f    from    %s', width, height, (time() - start_time), self.mapfile)
    return img
