1

I'm troubling with save of shapes in db. The shapes are steel sheet cuts, with may be holes, therefore are collections. I decided to solve to my self the problem, to allow the easy exportation between pc. But I cannot achive to detect the mirrored shapes. I wrote some very robust code to detect the equality, but doesn't detect the mirrored copies. The nature of the problem impose to detect it, because if a sheet has a good surface, these are different shapes. I would wonder if postgis detect mirrored copies as different copies or also treat them as equal? Ore if somebody can help me with my routine, to detect the equality I wrote an adjacenze matrix of distances between each vertex. If the sum of each row are equal to the new shape the shapes are equal( an extension of a triangle is equal to another if three infos are equal) . But I cannot find a way to define the mirror, if not go throug perverse code and analyze the points.

  • What do you mean by mirrored shapes? Why collections because of holes? A polygon can have holes. About eauality, why not use ST_Equals? – Nicklas Avén Jul 1 '15 at 8:51
  • Welcome to GIS.SE. It might be helpful to post some relevant code? There are ST_Equals, ST_Translate and ST_Rotate functions that you could theoretically use, but you without knowing which axis to use for defining mirroring, hard to help. – John Powell Jul 1 '15 at 8:51
  • It is not really a matter of code, but of geometry. Scope of work is select shapes in autocad, store them and make the resume for cutting planes to give them to workshop. Most frequently,there are mirrored shapes, due to simmetry. If the metal is black there is no problem, you turn the piece at other side but if the metal has a surface "good" and one not are differents cuts. Therefore I must be able to detect this difference. The simmetry axis is not possible define before. But before begin to implement postgis and discovery that doesn't help I would want besure that works – jurhas Jul 1 '15 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.