'Equivalence testing, a Geometry may be compared with another Geometry
or an EWKT representation.'

def __eq__(self, other):

    if isinstance(other, str):
        try:
            other = GEOSGeometry.from_ewkt(other)
        except (ValueError, GEOSException):
            return False
    return (isinstance(other, GEOSGeometry) and (self.srid == other.srid) and self.equals_exact(other))
