geo_in_rectangle: extract code that fills in_rectangle_data