-
Notifications
You must be signed in to change notification settings - Fork 52
Xenium Reader now filters out invalid polygons #283
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #283 +/- ##
==========================================
- Coverage 55.23% 55.16% -0.07%
==========================================
Files 26 26
Lines 2848 2844 -4
==========================================
- Hits 1573 1569 -4
Misses 1275 1275
🚀 New features to boost your workflow:
|
|
Thanks Tim. I'll make a minor change: I'll filter the data in the function that reads the polygons, to avoid to read the polygon data twice. |
|
Can you point to some data to reproduce the behavior? I'd like to test that the polygons with 3 vertices are really degenerate and not triangles that can be closed. |
|
For polygons with 4 vertices the problem could be the line def _poly(arr: ArrayLike) -> Polygon:
return Polygon(arr[:-1]) |
|
I investigated this issue. As shown in the example here kharchenkolab/Baysor#153 (comment), the problem does not seem to originate from degenerate polygons. Instead, it arises from the fact that in the The constructor def _poly(arr: ArrayLike) -> Polygon:
return Polygon(arr[:-1])when a polygon was a triangle, the unusual version with the last row omitted triggered the reported bug. The fact that the polygons are not degenerate is also emphasized by this comment #245 (comment), which states that the associated table data is valid. As a result, a patch is simpler to implement, allowing to avoid filtering the table. If future users report issues with degenerate polygons during parsing, we can implement some variation of the code for filtering the table in the commit history of this PR. However, I do not think such problems will arise. |
No description provided.