Skip to content

Improve radius search handling

For now we filter out networks that do not have a station in the radius search limits python-side. This is un-optimized

It would be better if the filtering was done directly in the queryset using django ninja filters

Furthermore, network level for radius search does NOT work

class GetFilter(BaseFilter): 

    ....

    def filter_minradius(self, value: Angle) -> Q:
        if value:
            return Q(station__distance__gte=to_distance(value))
        return Q()

    def filter_maxradius(self, value: Angle) -> Q:
        if value:
            return Q(station__distance__lte=to_distance(value))
        return Q()

Ideas :

  • create a NetworkQueryset that filters out outside radius networks directly ?
Edited by Simon Panay
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information