Skip to content

Comments

Make MultiPolygon accept polygons without holes#1850

Merged
mwtoews merged 4 commits intoshapely:mainfrom
mdczaplicki:patch-1
Jul 17, 2023
Merged

Make MultiPolygon accept polygons without holes#1850
mwtoews merged 4 commits intoshapely:mainfrom
mdczaplicki:patch-1

Conversation

@mdczaplicki
Copy link
Contributor

No description provided.

@mwtoews
Copy link
Member

mwtoews commented Jul 12, 2023

Thanks, this is an old bug!

A shapely 2 workaround is to use shapely.multipolygons(coords2), which seems to work fine.

@mdczaplicki
Copy link
Contributor Author

That's what I'm using in the code. But it bothered me that I can't use the main API of the package.

@mwtoews
Copy link
Member

mwtoews commented Jul 13, 2023

Agree @mdczaplicki that this should be fixed for main API. I've added a few commits to get it ready. I'll backport it for the next 2.0 micro release after this is reviewed and merged (the doc changes need to be moved to the 2.0.2 section).

@mwtoews mwtoews added this to the 2.0.2 milestone Jul 13, 2023
@coveralls
Copy link

coveralls commented Jul 13, 2023

Pull Request Test Coverage Report for Build 5538221657

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 87.618%

Totals Coverage Status
Change from base Build 5514971734: 0.3%
Covered Lines: 2512
Relevant Lines: 2867

💛 - Coveralls

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Thanks, looking good!

@mwtoews mwtoews merged commit 60e6b99 into shapely:main Jul 17, 2023
@mwtoews
Copy link
Member

mwtoews commented Jul 17, 2023

Backported to maint-2.0 with 732370c

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.

4 participants