

def extent(self, srid=None):
    'Returns the GeoQuerySet extent as a 4-tuple.\n\n        The method chaining approach of\n        geoqset.objects.transform(srid).extent() returns the extent in the\n        original coordinate system, this method allows for transformation.\n\n        Keyword args:\n        srid -- EPSG id for for transforming the output geometry.\n        '
    if ((not srid) and (not connection.ops.spatialite)):
        return super(GeoQuerySet, srid).extent()
    transform = self._transform(srid)
    if connection.ops.spatialite:
        ext = {
            'extent': ('AsText(%s(%s))' % ('Extent', transform)),
        }
    else:
        ext = {
            'extent': ('%s(%s)' % (connection.ops.extent, transform)),
        }
    extent = self.extra(select=ext).values_list('extent', flat=True).order_by()[0]
    if (not extent):
        return ()
    try:
        try:
            return connection.ops.convert_extent(extent)
        except TypeError:
            return connection.ops.convert_extent(extent, get_srid(self))
    except NotImplementedError:
        return geos.GEOSGeometry(extent, srid).extent

dataset/ETHPy150Open bkg/django-spillway/spillway/query.py GeoQuerySet.extent/VarMisuse@40/161 `self`->`srid`