'Return the version of PROJ.4 used by PostGIS as a tuple of the
major, minor, and subminor release numbers.'

def proj_version_tuple(self):

    proj_regex = re.compile('(\\d+)\\.(\\d+)\\.(\\d+)')
    proj_ver_str = self.postgis_proj_version()
    m = proj_regex.search(proj_ver_str)
    if m:
        return tuple(map(int, [m.group(1), m.group(2), m.group(3)]))
    else:
        raise Exception('Could    not    determine    PROJ.4    version    from    PostGIS.')
