Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing tests test_multipolygon_cx_selection #144

Closed
hoxbro opened this issue Aug 8, 2024 · 0 comments · Fixed by #149
Closed

Failing tests test_multipolygon_cx_selection #144

hoxbro opened this issue Aug 8, 2024 · 0 comments · Fixed by #149
Labels
bug Something isn't working
Milestone

Comments

@hoxbro
Copy link
Member

hoxbro commented Aug 8, 2024

Observed in #142, that the following test is started to fail: test_multipolygon_cx_selection

import geopandas as gpd
from shapely.geometry import shape
from spatialpandas.geometry import MultiPolygonArray

geometry = {"type": "MultiPolygon", "coordinates": [[[[0, 50], [20, 50], [50, 20], [50, 0]]]]}
geometry = {"type": "Polygon", "coordinates": [[[0, 50], [20, 50], [50, 20], [50, 0]]]}
gp_multipolygon = gpd.GeoSeries([shape(geometry)])
xslice, yslice = (slice(None, 0.0, None), slice(50.0, None, None))  # Works if slice is 50.0000001
expected = MultiPolygonArray.from_geopandas(gp_multipolygon.cx[xslice, yslice])
result = MultiPolygonArray.from_geopandas(gp_multipolygon).cx[xslice, yslice]
assert all(expected == result)
@hoxbro hoxbro added this to the v0.5.0 milestone Aug 8, 2024
@hoxbro hoxbro added the bug Something isn't working label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant