'Figures out the correct OGR Type based upon the input.'

def __init__(self, type_input):

    if isinstance(type_input, OGRGeomType):
        num = type_input.num
    elif isinstance(type_input, basestring):
        type_input = type_input.lower()
        if (type_input == 'geometry'):
            type_input = 'unknown'
        num = self._str_types.get(type_input, None)
        if (num is None):
            raise OGRException(('Invalid    OGR    String    Type    "%s"' % type_input))
    elif isinstance(type_input, int):
        if (not (type_input in self._types)):
            raise OGRException(('Invalid    OGR    Integer    Type:    %d' % type_input))
        num = type_input
    else:
        raise TypeError('Invalid    OGR    input    type    given.')
    self.num = num
