Skip to content

Commit

Permalink
fix missing crs in metadata for points_from_xy (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
dluks authored Nov 12, 2024
1 parent 097faa2 commit d13512e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dask_geopandas/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ def func(data, x, y, z):
)

return df.map_partitions(
func, x, y, z, meta=geopandas.GeoSeries(), token="points_from_xy"
func, x, y, z, meta=geopandas.GeoSeries(crs=crs), token="points_from_xy"
)


Expand Down
2 changes: 1 addition & 1 deletion dask_geopandas/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ def func(data, x, y, z):
)

return df.map_partitions(
func, x, y, z, meta=geopandas.GeoSeries(), token="points_from_xy"
func, x, y, z, meta=geopandas.GeoSeries(crs=crs), token="points_from_xy"
)


Expand Down
1 change: 1 addition & 0 deletions dask_geopandas/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def test_points_from_xy_with_crs():
)
assert isinstance(actual, dask_geopandas.GeoSeries)
assert_geoseries_equal(actual.compute(), expected)
assert actual.crs == expected.crs


def test_from_wkt():
Expand Down

0 comments on commit d13512e

Please sign in to comment.