-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
As pointed out in #513 (comment), MultiPolygons still cause issues.
MRE from @quentinblampey
from shapely import Polygon
from geopandas import GeoDataFrame
from spatialdata import SpatialData
from spatialdata.models import ShapesModel
import spatialdata_plot
ext = [
(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()
Apparently, polygons have an inner orientation and our code was naively assuming it's always the same
Metadata
Metadata
Assignees
Labels
No labels