Estoy utilizando Postgis 2.3. Tengo dos geometrías que se tocan y que obtuve de una operación de superposición (ST_Difference):
id | st_astext
3 | MULTIPOLYGON(((0 -2,0 4,3 4,6 1,0 -2)),((6 6,8 8,8 4,6 6)))
4 | POLYGON((2 6,7 9,7 7,6 6,7 5,7 0,4 0,6 1,4.33333333333333 2.66666666666667,5 4,2 6))
Sin embargo, cuando compruebo su intersección, no sólo obtengo cadenas de líneas, sino también un polígono.
select st_AsText(ST_Intersection(a.the_geom, b.the_geom)) from renovation a, renovation b where a.id=4 and b.id=3;
GEOMETRYCOLLECTION(LINESTRING(7 7,6 6),LINESTRING(6 6,7 5),LINESTRING(4 0,6 1),POLYGON((6 1,4.33333333333333 2.66666666666667,4.33333333333333 2.66666666666667,6 1)))
Este polígono es muy raro; tiene dos vértices iguales, pero es válido, y tiene un área no nula.
¿Cómo ocurre esto y cómo puedo evitarlo o filtrar este polígono innecesario?