Skip to content

docs: queries return MultiPolygons whole - #1265

Open
FarisHrvat wants to merge 1 commit into
scverse:mainfrom
FarisHrvat:doc-multipolygon-query
Open

FarisHrvat wants to merge 1 commit into
scverse:mainfrom
FarisHrvat:doc-multipolygon-query

Conversation

@FarisHrvat

Copy link
Copy Markdown

Fixes #1255

Documents that bounding_box_query and polygon_query without clip return shapes whole, including MultiPolygon components entirely outside the query region, and points to polygon_query(clip=True) with shapely.box(...) for cutting them.

bounding_box_query and polygon_query without clip keep every component of a
MultiPolygon that intersects the query region, including components entirely
outside of it. Say so, and point to polygon_query(clip=True).

Fixes scverse#1255
@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.40%. Comparing base (ea93a37) to head (546220c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1265   +/-   ##
=======================================
  Coverage   91.40%   91.40%           
=======================================
  Files          53       53           
  Lines        8381     8381           
=======================================
  Hits         7661     7661           
  Misses        720      720           
Files with missing lines Coverage Δ
src/spatialdata/_core/query/spatial_query.py 95.01% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Document that spatial queries on MultiPolygon keep also the components outside the queried region

1 participant