Opened 4 years ago

Last modified 3 years ago

#4867 new enhancement

topology.InteriorsIntersect(TopoGeometry, TopoGeometry)

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS Fund Me
Component: topology Version:
Keywords: Cc:

Description (last modified by strk)

A function returning true if two TopoGeometry objects defined on the _same_ underlaying topology share at least a common element.

NOTE this is different from an && operator (#1290)

Change History (8)

comment:1 by strk, 4 years ago

Calling it ST_Overlaps may greatly speed up existing code calling ST_Overlaps(TopoGeometry, TopoGeometry) but if we take that path we'll then have to support ANY TopoGeometry in order to retain semantic of existing calls (can't bail out if the TopoGeometry objects are not in the same topology...)

comment:2 by strk, 4 years ago

Important thing: the semantic of the function I want to make is NOT the same as ST_Overlap, I just realized, because ST_Overlap returns FALSE if an area is fully contained in the other. I don't know if an OGC defined predicate does exist to mean "areal geometries have some area in common". It's probably not ST_Intersects because that one also returns true for _linear_ intersections, and it's not ST_Overlap... do we want another function with a common meaning for this ?

comment:3 by strk, 4 years ago

Description: modified (diff)
Summary: topology.Overlap(TopoGeometry, TopoGeometry)topology.InteriorIntersects(TopoGeometry, TopoGeometry)

comment:4 by strk, 4 years ago

Using ST_InteriorIntersects() could be one thing for exposing this at the PostGIS level as well. On PostGIS side it could be a wrapper around ST_Relate(g1, g2, 'T********')

Last edited 4 years ago by strk (previous) (diff)

comment:5 by strk, 4 years ago

See #4868 for a SFS implementation

comment:6 by strk, 4 years ago

Summary: topology.InteriorIntersects(TopoGeometry, TopoGeometry)topology.InteriorsIntersect(TopoGeometry, TopoGeometry)

comment:7 by strk, 4 years ago

For using in an EXCLUSION CONSTRAINT we'd also need an operator: https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-EXCLUSION

What could an "interiors intersect" operator look like ?

comment:8 by strk, 3 years ago

Milestone: PostGIS 3.2.0PostGIS Fund Me
Note: See TracTickets for help on using tickets.