Opened 21 months ago
Last modified 2 months ago
#5352 assigned enhancement
ST_ClusterRelate(geom, de9impattern)
Reported by: | pramsey | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.6.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
Much like ST_ClusterIntersecting, but allowing ANY DE9IM pattern to determine if a geometry should be added to the cluster. Could be used for use cases like "cluster all the houses that share an edge, but not a corner", or "cluster all the roads with end-point intersections, but not crossing edges".
Change History (5)
comment:1 by , 21 months ago
comment:2 by , 21 months ago
This is a good place to note that work has begun on an improved DE9IM relate implementation, which will allow short-circuiting and indexing for all patterns. This essentially provides "PreparedRelate". It should provide improved performance for Clustered Relate.
It should be able to support the extended pattern functionality as well. Patterns will be "compiled", in a similar (but simpler) way that RegExes can be compiled and evaluated.
comment:4 by , 17 months ago
Milestone: | PostGIS 3.4.0 → PostGIS 3.5.0 |
---|
comment:5 by , 2 months ago
Milestone: | PostGIS 3.5.0 → PostGIS 3.6.0 |
---|
Feel free to move this back if you think you can get done before Monday.
This would be even more useful if the DE9IM pattern functionality was enhanced to allow more expressive patterns. In particular, an "OR" capability would allow expressing relationships such as "polygons which share an edge or whose interiors intersect". (This is useful to support clustering/unioning polygons which are adjacent or overlapping, but not just touching at single points).
A syntax supporting OR could be:
While we're at it, it would be nice to allow a "dotted notation" for DE9IM patterns, for easier reading: