

def tile(self, bbox, tolerance=0.0, format=None, clip=False):
    'Returns a GeoQuerySet intersecting a tile boundary.\n\n        Arguments:\n        bbox -- tile extent as geometry\n        Keyword args:\n        tolerance -- geometry simplification tolerance\n        format -- vector tile format as str\n        clip -- clip geometries to tile boundary as boolean\n        '
    clone = filter_geometry(self, intersects=bbox.ewkt)
    tile_srid = 3857
    coord_srid = bbox.srid
    transform = clone._transform()
    if clone:
        ewkt = ('GeomFromEWKT' if connection.ops.spatialite else 'ST_GeomFromEWKT')
        transform = ("ST_Intersection(%s, %s('%s'))" % (transform, ewkt, bbox.ewkt))
    if (clone.geo_field.srid != tile_srid):
        transform = ('ST_Transform(%s, %s)' % (transform, tile_srid))
    simplify = clone._simplify(transform, tolerance)
    latlng = ('ST_Transform(%s, %s)' % (simplify, coord_srid))
    if (format == 'pbf'):
        return clone.pbf(bbox, geo_col=latlng)
    return clone._as_format(latlng, format)

dataset/ETHPy150Open bkg/django-spillway/spillway/query.py GeoQuerySet.tile/VarMisuse@58/167 `clip`->`clone`