duckdb_spatial icon indicating copy to clipboard operation
duckdb_spatial copied to clipboard

Feature Request: ST_Subdivide

Open sambcom opened this issue 7 months ago • 2 comments

Just like the nicely formatted https://github.com/duckdb/duckdb-spatial/issues/367 I'd love to add ST_Subdivide to avoid a copy back and forth to Postgres.

The new spatial join stuff is fantastic! I found with humongous polygons with 100s of thousands of points I can speed up ST_Intersects joins by over 50x by using ST_Subdivide to balloon the row count and decrease the complexity of each polygon.

sambcom avatar May 26 '25 01:05 sambcom

Hey @Maxxen, if it is alright for you, I would like to take a shot at this, as I have found the need for this function quite a few times. Before getting started, I wanted to ask if you would be looking for an implementation from scratch or rather vendoring something like librttopo?

JoelJaeschke avatar Nov 20 '25 19:11 JoelJaeschke

Hey @JoelJaeschke! I would strongly prefer a from scratch implementation, or a implementation using our existing dependencies (e.g. GEOS). Spatial already has a ton of third party code and it greatly complicates building and maintenance as well as adds a bunch of bloat so I would really like to avoid adding more.

Maxxen avatar Nov 20 '25 23:11 Maxxen