

def __get__(self, obj, type=None):
    '\n        This accessor retrieves the geometry, initializing it using the geometry\n        class specified during initialization and the HEXEWKB value of the field.  \n        Currently, only GEOS or OGR geometries are supported.\n        '
    geom_value = obj.__dict__[self._field.attname]
    if isinstance(geom_value, self._klass):
        geom = geom_value
    elif ((geom_value is None) or (geom_value == '')):
        geom = None
    else:
        geom = self._klass(geom_value)
        setattr(obj, self._field.attname, geom)
    return geom

dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/contrib/gis/db/models/proxy.py GeometryProxy.__get__/original