'Create a GDAL OSR Spatial Reference object from the given input.
The input may be string of OGC Well Known Text (WKT), an integer
EPSG code, a PROJ.4 string, and/or a projection "well known" shorthand
string (one of \'WGS84\', \'WGS72\', \'NAD27\', \'NAD83\').'

def __init__(self, srs_input='', srs_type='user'):

    if (srs_type == 'wkt'):
        self.ptr = capi.new_srs(c_char_p(''))
        self.import_wkt(srs_input)
        return
    elif isinstance(srs_input, str):
        try:
            srid = int(srs_input)
            srs_input = ('EPSG:%d' % srid)
        except ValueError:
            pass
    elif isinstance(srs_input, int):
        srs_type = 'epsg'
    elif isinstance(srs_input, self.ptr_type):
        srs = srs_input
        srs_type = 'ogr'
    else:
        raise TypeError(('Invalid    SRS    type    "%s"' % srs_type))
    if (srs_type == 'ogr'):
        srs = srs_input
    else:
        buf = c_char_p('')
        srs = capi.new_srs(buf)
    if (not srs):
        raise SRSException(('Could    not    create    spatial    reference    from:    %s' % srs_input))
    else:
        self.ptr = srs
    if (srs_type == 'user'):
        self.import_user_input(srs_input)
    elif (srs_type == 'epsg'):
        self.import_epsg(srs_input)
