Skip to content

Commit f8f98ea

Browse files
committed
BUG: fix index in spatial partitions
1 parent d60b432 commit f8f98ea

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

dask_geopandas/expr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def calculate_spatial_partitions(self):
233233
)
234234
).compute(),
235235
crs=self.crs,
236-
)
236+
).reset_index(drop=True)
237237
self.spatial_partitions = parts
238238

239239
def _propagate_spatial_partitions(self, new_object):

dask_geopandas/tests/io/test_arrow.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ def test_roundtrip(tmp_path, naturalearth_lowres):
9292
assert_geodataframe_equal(result_gpd, df)
9393
# reading back also populates the spatial partitioning property
9494
ddf.calculate_spatial_partitions()
95-
assert_geoseries_equal(result.spatial_partitions, ddf.spatial_partitions.envelope)
95+
assert_geoseries_equal(
96+
result.spatial_partitions,
97+
ddf.spatial_partitions.envelope,
98+
)
9699

97100

98101
def test_roundtrip_s3(s3_resource, s3_storage_options, naturalearth_lowres):

0 commit comments

Comments
 (0)