Union multiple polygons

49 views
Skip to first unread message

Denis Laprise

unread,
Jul 6, 2021, 10:32:31 AM7/6/21
to s2geometry-io
Hi,

I'd like to union many polygons together (similar to ST_Union in PostGIS) and I'm running into performance issues using S2Polygon::InitToUnion successively on the aggregated union and each polygon. Is there a more efficient way to do this?

Thanks
Denis

michael...@gmail.com

unread,
Dec 30, 2021, 3:56:22 AM12/30/21
to s2geometry-io
Hi, you can try using next method: static std::unique_ptr<S2Polygon> DestructiveUnion(std::vector<std::unique_ptr<S2Polygon> > polygons).

Thanks,
Michael

Reply all
Reply to author
Forward
0 new messages