Uh oh!
There was an error while loading. Please reload this page.
Polygons with holes are now rendered correctly - #513
Conversation
timtreis
commented
Nov 17, 2025
Hey @rushin682 and @quentinblampey, could you verify that your data works with this branch? |
codecov-commenter
commented
Nov 17, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #513 +/- ##
==========================================
+ Coverage 84.80% 84.84% +0.03%
==========================================
Files 8 8 Lines 2146 2158 +12 ==========================================
+ Hits 1820 1831 +11 - Misses 326 327 +1
🚀 New features to boost your workflow:
|
Uh oh!
There was an error while loading. Please reload this page.
quentinblampey
commented
Nov 20, 2025
Hi @timtreis, thanks for the fix! |
Actually I had some time to test it right now @timtreis, and, while it worked well on simple polygons, it didn't work on more complex polygons. Here is an example: fromshapelyimportPolygonfromgeopandasimportGeoDataFramefromspatialdataimportSpatialDatafromspatialdata.modelsimportShapesModelimportspatialdata_plotext= [
(7.866043666934409, 32.80184055229537),
(19.016191271980425, 203.48380872801957),
(75.90086964475744, 236.02570144190528),
(229.48380872801957, 235.98380872801957),
(235.98380872801957, 5.516191271980426),
(197.42585593903195, 6.144892860751103),
(116.5, 96.4575926540027),
(55.65582863082729, 12.531294107459374),
(7.866043666934409, 32.80184055229537),
]
interior= [
(160.12353079731844, 173.21221665537414),
(181.80184055229537, 159.13395633306558),
(198.86604366693442, 179.80184055229537),
(178.19815944770465, 198.86604366693442),
(160.12353079731844, 173.21221665537414),
]
polygon=Polygon(ext, [interior])
geo_df=GeoDataFrame(geometry=[polygon])
sdata=SpatialData(shapes={"test": ShapesModel.parse(geo_df)})
sdata.pl.render_shapes("test").pl.show()![]() While GeoPandas shows: ![]() Do you really need to convert it to a multipolygon? I think the inner geopandas function |
timtreis
commented
Nov 20, 2025
I have a bit of preemptive PTSD for making all transformations/parameters etc work if we'd swap to a new plotting function. We'd also loose control over the internals of it. Let me dig into that issue, I really thought it would be solved. The logger also correctly notices that there is a hole, it just doesn't plot it for some reason. I'm confused as to why this polygon is different from your previous example |
quentinblampey
commented
Nov 20, 2025
Yes, I'll also try many different things to understand what's different from the other polygon, but I couldn't find a solution yet... |


No description provided.