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

Fix MultiPolygon not iterable #496

Merged
merged 1 commit into from
May 31, 2024
Merged

Conversation

xiyuoh
Copy link
Member

@xiyuoh xiyuoh commented May 31, 2024

Similar to #476, shapely migration requires a minor update to our code. Without this PR fix the following error will occur when building certain maps that involve MultiPolygon: TypeError: 'MultiPolygon' object is not iterable

Copy link
Member

@luca-della-vedova luca-della-vedova left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! A shame we couldn't get this to reproduce in the test map to get a test for CI but I can confirm this fixes the issue in some of our more complex maps

@luca-della-vedova luca-della-vedova merged commit 34b38e1 into main May 31, 2024
6 checks passed
@luca-della-vedova luca-della-vedova deleted the xiyu/shapely_migration branch May 31, 2024 07:05
@Yadunund
Copy link
Member

Let's follow up with a PR to test this with the test map?

@luca-della-vedova
Copy link
Member

The problem is that the issue is very rare and actually doesn't happen in any of our demo scenarios so it's unclear how to replicate it. It's probably some edge case with floor triangulation and polygon subtraction that is not immediately clear to me

xiyuoh added a commit that referenced this pull request Jun 4, 2024
Signed-off-by: Xiyu Oh <[email protected]>
(cherry picked from commit 34b38e1)
luca-della-vedova pushed a commit that referenced this pull request Nov 7, 2024
luca-della-vedova pushed a commit that referenced this pull request Nov 7, 2024
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
luca-della-vedova added a commit that referenced this pull request Nov 8, 2024
* Fix MultiPolygon not iterable (#496)

Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>

* Handle geometry collections (#476)

I was trying a clean build of RMF Demos and ran into a type error when
trying to compile maps. This PR fixes the type error. I'm not sure what
triggered it in the first place TBH.

Signed-off-by: Arjo Chakravarty <[email protected]>
Co-authored-by: Yadunund <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>

---------

Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Co-authored-by: Xiyu <[email protected]>
Co-authored-by: Arjo Chakravarty <[email protected]>
Co-authored-by: Yadunund <[email protected]>
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.

3 participants