Skip to content

Commit

Permalink
replace 'total_tile' with 'tile_count'.
Browse files Browse the repository at this point in the history
  • Loading branch information
dabhicusp committed Dec 8, 2023
1 parent 9f5b7fc commit 9fa4422
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xee/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,21 +555,21 @@ def _get_tile_from_ee(

def _process_coordinate_data(
self,
total_tile: int,
tile_count: int,
tile_size: int,
end_point: int,
coordinate_type: str,
) -> np.ndarray:
"""Process coordinate data using multithreading for longitude or latitude."""
data = [
(tile_size * i, min(tile_size * (i + 1), end_point))
for i in range(total_tile)
for i in range(tile_count)
]
tiles = [None] * total_tile
tiles = [None] * tile_count
with concurrent.futures.ThreadPoolExecutor() as pool:
for i, arr in pool.map(
self._get_tile_from_ee,
list(zip(data, itertools.cycle([coordinate_type])))
list(zip(data, itertools.cycle([coordinate_type]))),
):
tiles[i] = (
arr.tolist() if coordinate_type == 'longitude' else arr.tolist()[0]
Expand Down

0 comments on commit 9fa4422

Please sign in to comment.