Skip to content

Commit

Permalink
fix shapefile
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Nov 13, 2023
1 parent 9da2712 commit e501e48
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions c3s_eqc_automatic_quality_control/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,13 @@ def _download_and_transform_requests(
if use_emohawk:
data = get_data(sources)
if isinstance(data, emohawk.readers.shapefile.ShapefileReader):
to_xarray = data.to_pandas().to_xarray
# FIXME: emohawk NotImplementedError
ds: xr.Dataset = data.to_pandas().to_xarray()
else:
to_xarray = data.to_xarray
ds: xr.Dataset = to_xarray(
xarray_open_mfdataset_kwargs=open_mfdataset_kwargs,
**TO_XARRAY_KWARGS,
)
ds = data.to_xarray(
xarray_open_mfdataset_kwargs=open_mfdataset_kwargs,
**TO_XARRAY_KWARGS,
)
if not isinstance(ds, xr.Dataset):
# When emohawk fails to concat, it silently return a list
raise TypeError(f"`emohawk` returned {type(ds)} instead of a xr.Dataset")
Expand Down

0 comments on commit e501e48

Please sign in to comment.