def filter_geometry(queryset, **filters):
    fieldname = geo_field(queryset).name
    query = {'%s__%s' % (fieldname, k): v for k, v in filters.items()}
    return queryset.filter(**query)
Helper function for spatial lookups filters.
dataset/ETHPy150Open bkg/django-spillway/spillway/query.py/filter_geometry