def commonextent(*args):
    """
    compute the common extent of multiple extent dictionaries.
    
    Parameters
    ----------
    args: dict
        an extent dictionary, see e.g. :attr:`spatialist.vector.Vector.extent`

    Returns
    -------
    dict:
        the common extent
    """
    ext_new = {}
    for ext in args:
        if len(ext_new.keys()) == 0:
            ext_new = ext
        else:
            for key in ['xmin', 'ymin']:
                if ext[key] > ext_new[key]:
                    ext_new[key] = ext[key]
            for key in ['xmax', 'ymax']:
                if ext[key] < ext_new[key]:
                    ext_new[key] = ext[key]
    return ext_new