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

Added support for nested multigeometries with test coverage #226

Merged
merged 1 commit into from
Apr 8, 2023

Conversation

ericmassip
Copy link
Contributor

Closes #52

Nested multigeometries is a valid use case, as the docs say. This PR adds support for nested multigeometries. They work the same way as first level multigeometries, to extract the geoms from one just call .geoms again.

E.g.:

first_multigeometry_geoms = first_multigeometry.geoms

# If first_multigeometry only has one geometry and it is a nested multigeometry
second_multigeometry_geoms = list(first_multigeometry.geoms)[0].geoms

@what-the-diff
Copy link

what-the-diff bot commented Apr 8, 2023

PR Summary

  • New Test Case Added
    A new test case has been added to cover nested MultiGeometry scenarios.
  • Bug Fix in _get_multigeometry() Function
    The bug that affected handling of nested MultiGeometries has been fixed.

@codecov
Copy link

codecov bot commented Apr 8, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (6bb9374) 93.00% compared to head (cf87477) 93.02%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #226      +/-   ##
===========================================
+ Coverage    93.00%   93.02%   +0.02%     
===========================================
  Files           26       26              
  Lines         4418     4432      +14     
===========================================
+ Hits          4109     4123      +14     
  Misses         309      309              
Impacted Files Coverage Δ
fastkml/geometry.py 94.75% <100.00%> (+0.10%) ⬆️
tests/oldunit_test.py 99.83% <100.00%> (+<0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cleder cleder merged commit 3d0a342 into cleder:develop Apr 8, 2023
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.

Wrong parsing of MultiGeometry when containing nested MultiGeometry
2 participants