def get_srid(queryset):
    """Returns the GeoQuerySet spatial reference identifier."""
    try:
        # Django 1.8
        srid = queryset.query.get_context('transformed_srid')
    except AttributeError:
        # Django<=1.7
        srid = queryset.query.transformed_srid
    return srid or queryset.geo_field.srid


# Many GeoQuerySet methods cannot be chained as expected and extending
# GeoQuerySet to work properly with serialization calls like
# .simplify(100).svg() will require patching
# django.contrib.gis.db.models.query. Work around this with a custom
# GeoQuerySet for now.
dataset/ETHPy150Open bkg/django-spillway/spillway/query.py/get_srid/original