'Does an equivalence test on the OGR type with the given
other OGRGeomType, the short-hand string, or the integer.'

def __eq__(self, other):

    if isinstance(other, OGRGeomType):
        return (self.num == other.num)
    elif isinstance(other, six.string_types):
        return (self.name.lower() == other.lower())
    elif isinstance(other, int):
        return (self.num == other)
    else:
        return False
