Skip to content

Conversation

@vincentsarago
Copy link
Member

closes #172

@vincentsarago
Copy link
Member Author

🤔 interesting there was some change in shapely/GEOS WKT 👀

FAILED tests/test_geometries.py::test_wkt[GEOMETRYCOLLECTION Z (POLYGON EMPTY, MULTIPOLYGON Z (((0.0 0.0 0.0, 1.0 1.0 0.0, 2.0 2.0 0.0, 3.0 3.0 0.0, 0.0 0.0 0.0))))] - shapely.errors.GEOSException: ParseException: Cannot mix dimensionality in a geometry.
FAILED tests/test_geometries.py::test_wkt[GEOMETRYCOLLECTION Z (LINESTRING Z (0.0 0.0 0.0, 1.0 1.0 1.0, 2.0 2.0 2.0), MULTILINESTRING ((0.0 0.0, 1.0 1.0), (1.0 1.0, 2.0 2.0)))] - shapely.errors.GEOSException: ParseException: Cannot mix dimensionality in a geometry.

@gadomski gadomski self-requested a review May 5, 2025 16:51
"GEOMETRYCOLLECTION (POINT (0.0 0.0), MULTIPOINT ((0.0 0.0), (1.0 1.0)))",
"GEOMETRYCOLLECTION Z (POLYGON EMPTY, MULTIPOLYGON Z (((0.0 0.0 0.0, 1.0 1.0 0.0, 2.0 2.0 0.0, 3.0 3.0 0.0, 0.0 0.0 0.0))))",
"GEOMETRYCOLLECTION Z (LINESTRING Z (0.0 0.0 0.0, 1.0 1.0 1.0, 2.0 2.0 2.0), MULTILINESTRING ((0.0 0.0, 1.0 1.0), (1.0 1.0, 2.0 2.0)))",
"GEOMETRYCOLLECTION Z (POLYGON Z ((0.0 0.0 0.0, 1.0 1.0 0.0, 2.0 2.0 0.0, 3.0 3.0 0.0, 0.0 0.0 0.0)), MULTIPOLYGON Z (((0.0 0.0 0.0, 1.0 1.0 0.0, 2.0 2.0 0.0, 3.0 3.0 0.0, 0.0 0.0 0.0))))",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out there was some change in GEOS and now we can't have a mixed of geometries with or without Z coordinates.

We will now raise a validation error as well

Copy link
Contributor

@gadomski gadomski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we are losing convenience methods, we are being more explicit, so 👍🏼

@vincentsarago vincentsarago merged commit a4147ff into main May 5, 2025
6 checks passed
@vincentsarago vincentsarago deleted the feature/remove-custom-iter-len-getitem branch May 5, 2025 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ValueError: dictionary update sequence element #0 when using dict on a FeatureCollection

3 participants