I am am using geodjango with postgis backend. Giving two polygons I want to check if they overlap. I mean, they have interior points in common. If we check
A.function(B)
In the following picture "Example 1" would be False, "Example 2", would be False (cause they only have edges in common) and "Example 3" Would be True, cause they have interior points in common. If both polygons are equal, the the function would return True as well.
The way to do it is using the geodjango functions "touches" and "intersects", wich use the "ST_Touches" and "ST_Intersects" postgis functions in the background
if A.intersects(B) and not A.touches(B):
print("Geometries have interior points in common")