app/django/contrib/gis/db/backend/adaptor.py
author Pawel Solyga <Pawel.Solyga@gmail.com>
Wed, 15 Apr 2009 15:56:17 +0000
changeset 2185 09ca8e661728
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Fix too long line and redefining variable 'review' from outer scope in soc.views.models.student_proposal module. Patch by: Pawel Solyga Reviewed by: to-be-reviewed

class WKTAdaptor(object):
    """
    This provides an adaptor for Geometries sent to the
    MySQL and Oracle database backends.
    """
    def __init__(self, geom):
        self.wkt = geom.wkt
        self.srid = geom.srid

    def __eq__(self, other):
        return self.wkt == other.wkt and self.srid == other.srid 

    def __str__(self):
        return self.wkt