verde.pad_region(region, pad)[source]

Extend the borders of a region by the given amount.

Parameters: region : list = [W, E, S, N] The boundaries of a given region in Cartesian or geographic coordinates. pad : float or tuple = (pad_north, pad_east) The amount of padding to add to the region. If it’s a single number, add this to all boundaries of region equally. If it’s a tuple of numbers, then will add different padding to the North-South and East-West dimensions. padded_region : list = [W, E, S, N] The padded region.

Examples

>>> pad_region((0, 1, -5, -3), 1)
(-1, 2, -6, -2)
>>> pad_region((0, 1, -5, -3), (3, 2))
(-2, 3, -8, 0)