I am using the following PostGIS (2.4) query for getting intersection elements and it's intersection points.
SELECT distinct ST_AsText((ST_Intersection(ST_Buffer(ST_ExteriorRing(a.geom), 0.2, 'endcap=round join=round'), ST_ExteriorRing(b.geom)))),a.elemid,b.elemid,a.layer,b.layer FROM "ShapeTable" as a,"ShapeTable" as b WHERE st_Intersects(a.geom, b.geom) and a.id != b.id order by a.elemid;
The above query does not return some elements' intersection combination. It only returns a few records. What is the problem in my query?