@@ -853,13 +853,13 @@ def generate_nonaggregated_tile(
853853 raise
854854
855855@lru_cache
856- def calculate_pixel_spread (max_zoom : int ,agg_zooms :int ) -> int :
856+ def calculate_pixel_spread (max_zoom : int , agg_zooms : int ) -> int :
857857 '''
858858 Pixel spread is the number of pixels to put around each
859859 data point.
860860 '''
861- logger .debug ('calculate_pixel_spread(%d,%d)' , max_zoom ,agg_zooms )
862- return max (int (abs (max_zoom - agg_zooms )),0 )
861+ logger .debug ('calculate_pixel_spread(%d,%d)' , max_zoom , agg_zooms )
862+ return max (int (abs (max_zoom - agg_zooms )), 0 )
863863
864864
865865def apply_spread (img , spread ):
@@ -1128,7 +1128,7 @@ def generate_tile(idx, x, y, z, headers, params, tile_width_px=256, tile_height_
11281128 geo_tile_grid .pipeline ("selector" , "bucket_selector" , buckets_path = {"doc_count" : "_count" }, script = f"params.doc_count >= { min_bucket } && params.doc_count <= { max_bucket } " )
11291129 if category_field :
11301130 geo_tile_grid = A ("geotile_grid" , field = geopoint_field , precision = geotile_precision )
1131- resp = ScanAggs (tile_s ,{"grids" : geo_tile_grid },inner_aggs ,size = composite_agg_size ,timeout = config .query_timeout_seconds )
1131+ resp = ScanAggs (tile_s , {"grids" : geo_tile_grid }, inner_aggs , size = composite_agg_size , timeout = config .query_timeout_seconds )
11321132 else :
11331133 if inner_aggs is not None :
11341134 for agg_name , agg in inner_aggs .items ():
@@ -1345,7 +1345,7 @@ def remap_bucket(bucket, search):
13451345
13461346 ###############################################################
13471347 # Common
1348- spread = spread or calculate_pixel_spread (max_agg_zooms ,agg_zooms )
1348+ spread = spread or calculate_pixel_spread (max_agg_zooms , agg_zooms )
13491349 img = apply_spread (img , spread )
13501350 img = img .to_bytesio ().read ()
13511351
0 commit comments