-- but it does not cross, because the intersection of the 2 is of the same dimension
-- as the maximum dimension of the 2
-SELECT ST_Overlaps(a,b) As a_overlap_b, ST_Crosses(a,b) As a_crosses_b, ST_Intersects(a, b) As a_intersects_b, ST_Contains(b,a) As b_contains_a, ST_Dimension(a) As dim_a, ST_Dimension(b) as dim_b
-FROM (SELECT ST_Buffer(ST_GeomFromText('POINT(1 0.5)'), 3) As a, ST_Buffer(ST_GeomFromText('LINESTRING(1 0, 1 1, 3 5)'),0.5) As b)
+SELECT ST_Overlaps(a,b) As a_overlap_b, ST_Crosses(a,b) As a_crosses_b, ST_Intersects(a, b) As a_intersects_b,
+ST_Contains(b,a) As b_contains_a,
+ST_Dimension(a) As dim_a, ST_Dimension(b) as dim_b, ST_Dimension(ST_Intersection(a,b)) As dima_intersection_b
+FROM (SELECT ST_Buffer(ST_GeomFromText('POINT(1 0.5)'), 3) As a,
+ ST_Buffer(ST_GeomFromText('LINESTRING(1 0, 1 1, 3 5)'),0.5) As b)
As foo;
-a_overlap_b | a_crosses_b | a_intersects_b | b_contains_a | dim_a | dim_b
-------------+-------------+----------------+--------------+-------+-------
-t | f | t | f | 2 | 2
+ a_overlap_b | a_crosses_b | a_intersects_b | b_contains_a | dim_a | dim_b | dima_intersection_b
+-------------+-------------+----------------+--------------+-------+-------+---------------------
+ t | f | t | f | 2 | 2 | 2
</programlisting>
</refsection>