Skip to content

Commit 0d74371

Browse files
committed
lint
1 parent 0bf4f99 commit 0d74371

File tree

1 file changed

+2
-40
lines changed

1 file changed

+2
-40
lines changed

dask_geopandas/io/parquet.py

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
from functools import cached_property, partial
1+
from functools import partial
22

33
import dask.dataframe as dd
4+
45
import geopandas
56

67
from .arrow import (
7-
DASK_2022_12_0_PLUS,
8-
DASK_2023_04_0,
98
GeoDatasetEngine,
109
_get_partition_bounds,
1110
_update_meta_to_geodataframe,
@@ -62,43 +61,6 @@ class GeoArrowEngine(GeoDatasetEngine, DaskArrowDatasetEngine):
6261
correctly read/write GeoDataFrames.
6362
6463
"""
65-
@cached_property
66-
def _meta(self):
67-
meta = super()._meta
68-
gather_spatial_partitions = self._dataset_info.get(
69-
"gather_spatial_partitions", True
70-
)
71-
fs = self._dataset_info["fs"]
72-
parts = self._dataset_info["parts"]
73-
breakpoint()
74-
75-
if gather_spatial_partitions:
76-
regions = geopandas.GeoSeries(
77-
[_get_partition_bounds_parquet(part, fs) for part in parts],
78-
crs=meta.crs,
79-
)
80-
if regions.notna().all():
81-
# a bit hacky, but this allows us to get this passed through
82-
meta.attrs["spatial_partitions"] = regions
83-
84-
return meta
85-
86-
# @classmethod
87-
# def read_metadata(cls, fs, paths, **kwargs):
88-
# meta, stats, parts, index = super().read_metadata(fs, paths, **kwargs)
89-
90-
# gather_spatial_partitions = kwargs.pop("gather_spatial_partitions", True)
91-
92-
# if gather_spatial_partitions:
93-
# regions = geopandas.GeoSeries(
94-
# [_get_partition_bounds_parquet(part, fs) for part in parts],
95-
# crs=meta.crs,
96-
# )
97-
# if regions.notna().all():
98-
# # a bit hacky, but this allows us to get this passed through
99-
# meta.attrs["spatial_partitions"] = regions
100-
101-
# return (meta, stats, parts, index)
10264

10365
@classmethod
10466
def _update_meta(cls, meta, schema):

0 commit comments

Comments
 (0)