def check_srs(self, source_srs):

        if isinstance(source_srs, SpatialReference):
            sr = source_srs
        elif isinstance(source_srs, self.spatial_backend.spatial_ref_sys()):
            sr = source_srs.srs
        elif isinstance(source_srs, (int, basestring)):
            sr = SpatialReference(source_srs)
        else:
            # Otherwise just pulling the SpatialReference from the layer
            sr = self.layer.srs

        if not sr:
            raise LayerMapError('No source reference system defined.')
        else:
            return sr
Checks the compatibility of the given spatial reference object.
dataset/ETHPy150Open adieu/django-nonrel/django/contrib/gis/utils/layermapping.py/LayerMapping.check_srs