<div dir="ltr"><div>Thanks, Paul! Appreciate these thoughts - and considerations.  I'll keep these ideas in mind as I proceed and see where I end up.  Definitely trying to keep things simpler than not all things considered... we'll see!</div><div>Best,</div><div>Mike</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Jan 15, 2026 at 1:16 PM Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br id="m_-2293784447302591354lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Jan 15, 2026, at 9:46 AM, Mike Treglia <<a href="mailto:mtreglia@gmail.com" target="_blank">mtreglia@gmail.com</a>> wrote:</div><br><div><div style="font-family:HelveticaNeue;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">Is there an obvious or more optimal way to do that st_union(st_exteriorring(geom)) step for large datasets? </div><br></div></blockquote></div><br><div>Just spitballing…</div><div><br></div><div>Starting with an ST_Subdivide on all the rings, writing out the ring segments and a unique key into a staging table.</div><div>Then do the st_union on a gridded basis. I think that should be safe?</div><div>The part I worry about is doing the polygon building, unless you do the build with overlapping grid cells to select potential input ring segments, and then post-filter the polygon collection you get to remove any overlapping/duplicated polygons. My concern is that a very large input polygon relative to the grid size might fail to be built, if all its component pieces do not happen to fall into a single grid cell.</div><div>At some point you end up building something of the scale and complexity of the topology module, and maybe you would be able to get some good results starting there instead.</div><div>P.</div></div></blockquote></div>