Re: [postgis-users] Finding all polygons crossing a large polygons boundary

2023-12-05 Thread Paul Ramsey via postgis-users
Sort of ugly but… CREATE TEMPORARY TABLE p_edges AS SELECT p.id , st_subdivide((st_dumprings((st_dump(geom)).geom)).geom) as geom FROM p; CREATE INDEX p_edges_geom_x ON p_edges USING GIST (geom); SELECT a.id , p.id FROM a JOIN p_edges ON

[postgis-users] Finding all polygons crossing a large polygons boundary

2023-12-05 Thread Mats Taraldsvik via postgis-users
Hi, I have a large polygon P in a query against a table A where I'm only interested in A's polygons that touch/crosses the boundary of P. I have tried https://postgis.net/docs/ST_DumpSegments.html but it does generate a lot of geometries when the polygon has 100s or 1000s of points. Are there