Changes both BBox dimensions (width and height) by a percentage of size of each dimension. If number is
        negative, the size will decrease. Returns a new instance of BBox object.

        :param buffer: A percentage of BBox size change
        :type buffer: float
        :return: A new bounding box of buffered size
        :rtype: BBox

def buffer(self, buffer):
        """ Changes both BBox dimensions (width and height) by a percentage of size of each dimension. If number is
        negative, the size will decrease. Returns a new instance of BBox object.

        :param buffer: A percentage of BBox size change
        :type buffer: float
        :return: A new bounding box of buffered size
        :rtype: BBox
        """
        if buffer < -1:
            raise ValueError('Cannot reduce the bounding box to nothing, buffer must be >= -1.0')
        ratio = 1 + buffer
        mid_x, mid_y = self.middle
        return BBox((mid_x - (mid_x - self.min_x) * ratio, mid_y - (mid_y - self.min_y) * ratio,
                     mid_x + (self.max_x - mid_x) * ratio, mid_y + (self.max_y - mid_y) * ratio), self.crs)