def __get__(self, obj, type=None): 
        """
        This accessor retrieves the geometry, initializing it using the geometry
        class specified during initialization and the HEXEWKB value of the field.  
        Currently, only GEOS or OGR geometries are supported.
        """
        # Getting the value of the field.
        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: 
            # Otherwise, a Geometry object is built using the field's contents,
            # and the model's corresponding attribute is set.
            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