|
1 |
| -from functools import cached_property, partial |
| 1 | +from functools import partial |
2 | 2 |
|
3 | 3 | import dask.dataframe as dd
|
| 4 | + |
4 | 5 | import geopandas
|
5 | 6 |
|
6 | 7 | from .arrow import (
|
7 |
| - DASK_2022_12_0_PLUS, |
8 |
| - DASK_2023_04_0, |
9 | 8 | GeoDatasetEngine,
|
10 | 9 | _get_partition_bounds,
|
11 | 10 | _update_meta_to_geodataframe,
|
@@ -62,43 +61,6 @@ class GeoArrowEngine(GeoDatasetEngine, DaskArrowDatasetEngine):
|
62 | 61 | correctly read/write GeoDataFrames.
|
63 | 62 |
|
64 | 63 | """
|
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) |
102 | 64 |
|
103 | 65 | @classmethod
|
104 | 66 | def _update_meta(cls, meta, schema):
|
|
0 commit comments