From 82974049fde30b5f57fa634b97a25c1268676aad Mon Sep 17 00:00:00 2001 From: Christian Ledermann Date: Tue, 3 Dec 2024 20:52:28 +0000 Subject: [PATCH] add geometry collection recursively to geometry collection, fixes #221 --- pygeoif/hypothesis/strategies.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pygeoif/hypothesis/strategies.py b/pygeoif/hypothesis/strategies.py index e50f7d02..14326704 100644 --- a/pygeoif/hypothesis/strategies.py +++ b/pygeoif/hypothesis/strategies.py @@ -601,6 +601,19 @@ def geometry_collections( # noqa: PLR0913 srs=srs, has_z=has_z, ), + st.recursive( + geometry_collections( + min_geoms=min_geoms, + max_geoms=max_geoms, + max_points=max_points, + min_interiors=min_interiors, + max_interiors=max_interiors, + srs=srs, + has_z=has_z, + ), + lambda children: children, + max_leaves=3, + ), ), min_size=min_geoms, max_size=max_geoms,