I tried some functions in postgis. Scope of work, get the equality of two shapes, independently of their orientation in the space. I detect the shapes from autocad and of course in lifetime of a project, can happen that two shapes in two different draws are oriented int different way. so i tried the very first relationship, get difference of mirrored shapes(this was my very first trouble):
select st_equals(
ST_GeomFromEWKT('TRIANGLE ((0 0, 5 10, 30 0, 0 0))'),
ST_GeomFromEWKT('TRIANGLE ((0 0, 5 -10, 30 0, 0 0))'))
And i get False. Perfect. But I was not more happy, when i just tried to rotate the geometry:
select st_equals(
ST_GeomFromEWKT('TRIANGLE ((0 0, 5 10, 30 0, 0 0))'),
ST_GeomFromEWKT('TRIANGLE ((0 0, -10 5, 0 30, 0 0))'))
These are the same triangle, just rotate of 90°,I get also False. Is postgis able to define the equality of shapes, also if are rotate in the space?
