[postgis-devel] Proposal: ST_Overlay function

Andrew Joseph ap.joseph at live.com
Thu Nov 26 14:05:07 PST 2020


This would be incredibly useful and likely become one of the most used functions in Postgis!

Personally I think the simplest most intuitive function definition would be

st_polygonal_overlay(idpoly[]) RETURNS SETOF idpolyportion;

CREATE TYPE idpoly(
  id integer,
   geom geometry(Polygon)
);


CREATE TYPE idpoly_portion(
  parent_ids integer[],
  geom geometry(Polygon)
);

This would make it trivial to recombine the geometries with the originals.

The biggest question I’d have would be how would parallelization work? Might be helpful to have another function that would create an ideal grid for clipping input geometries maybe something like:

st_create_parallel_overlay_grid(geoms geometry[], numcores integer, max_mem_per_grid integer) RETURNS box2d;

This way you could spread out st_polygonal_overlay across cores, then recombine using st_union by comparing parent_ids.

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20201126/70e92386/attachment.html>


More information about the postgis-devel mailing list