Skip to content

Commit

Permalink
changed control flow logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Azaya89 committed Nov 29, 2024
1 parent 1e15591 commit 599aa48
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions hvplot/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2170,12 +2170,13 @@ def _process_tiles_without_geo(self, data, x, y):
elif not is_geodataframe(data) and (x is None or y is None):
return data, x, y

if is_geodataframe(data):
if is_lazy_data(data):
# To prevent eager evaluation: https://github.com/holoviz/hvplot/pull/1432
pass
elif is_geodataframe(data):
if getattr(data, 'crs', None) is not None:
data = data.to_crs(epsg=3857)
return data, x, y
elif not is_lazy_data(data):
# To prevent eager evaluation: https://github.com/holoviz/hvplot/pull/1432
else:
min_x = np.min(data[x])
max_x = np.max(data[x])
min_y = np.min(data[y])
Expand All @@ -2193,7 +2194,8 @@ def _process_tiles_without_geo(self, data, x, y):
data[new_y] = northing
if is_xarray(data):
data = data.swap_dims({x: new_x, y: new_y})
return data, new_x, new_y
x = new_x
y = new_y
return data, x, y

def chart(self, element, x, y, data=None):
Expand Down

0 comments on commit 599aa48

Please sign in to comment.