def srs(self):
        """
        Returns a GDAL SpatialReference object, if GDAL is installed.
        """
        if HAS_GDAL:
            # TODO: Is caching really necessary here?  Is complexity worth it?
            if hasattr(self, '_srs'):
                # Returning a clone of the cached SpatialReference object.
                return self._srs.clone()
            else:
                # Attempting to cache a SpatialReference object.

                # Trying to get from WKT first.
                try:
                    self._srs = SpatialReference(self.wkt)
                    return self.srs
                except Exception, msg:
                    pass

                try:
                    self._srs = SpatialReference(self.proj4text)
                    return self.srs
                except Exception, msg:
                    pass

                raise Exception('Could not get OSR SpatialReference from WKT: %s\nError:\n%s' + (self.wkt, msg))
        else:
            raise Exception('GDAL is not installed.')
dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/contrib/gis/models.py/SpatialRefSysMixin.srs/operator `%` -> `+`