title: Remove transform from svg OR Get Java awt components from SVG path
body: <p>I have a svg image, where multiple path elements are grouped like this:</p>
  
  <pre><code> &lt;g
     id="gbase-7-2"
     transform="rotate(180,1066.40705,-904.8082)"&gt;
    &lt;path
       sodipodi:nodetypes="ccccc"
       id="basetroc-1-5-8"
       d="M 245.83838,-1232.793 308.95904,-1342.1212 498.32103,-1232.793 403.64003,-1123.4648 Z"
       style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#ffcd9e;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
       inkscape:connector-curvature="0" /&gt;
    &lt;path
       sodipodi:nodetypes="ccccc"
       id="basetroc-2-8-7"
       d="M 498.32103,-1232.793 687.6830099999998,-1123.4648 561.4416799999999,-1014.1366 403.6400299999999,-1123.4648 Z"
       style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#d18946;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
       inkscape:connector-curvature="0" /&gt;
  </code></pre>
  
  <p>and so on. Every path is a field from a chessboard. Overall all the groups (and for that the path) draw a hexagonal chessboard.</p>
  
  <p>Now I want to know the coordinates of every field, because of i wanna know which field is clicked in a Swing/AWT Java application with the picture in the background. The problem is that all the groups are transformed with a rotation.
  Is there any way to get the "real coordinates" of every piece?
  Thank you very much :-)
  <a href="https://i.stack.imgur.com/ORK7d.png" rel="nofollow noreferrer">Chessboard</a></p>
  
  <p>I tried this to remove any translation:
  <a href="https://github.com/Klowner/inkscape-applytransforms" rel="nofollow noreferrer">https://github.com/Klowner/inkscape-applytransforms</a>
  It draws a working svg, but the path are looking like this:</p>
  
  <pre><code> &lt;path
           id="basetroc-1"
           d="M270.96338 617.6461C270.96338 617.6461 334.08404 508.3179 334.08404 508.3179C334.08404 508.3179 523.44603 617.6461 523.44603 617.6461C523.44603 617.6461 428.76503 726.9743 428.76503 726.9743C428.76503 726.9743 270.96338 617.6461 270.96338 617.6461C270.96338 617.6461 270.96338 617.6461 270.96338 617.6461"
           style="stroke-linejoin:miter;stroke-width:5.0;stroke-opacity:1;fill-opacity:1;color:#000000;fill-rule:nonzero;stroke-dashoffset:0;visibility:visible;stroke:#000000;stroke-linecap:butt;stroke-miterlimit:4;marker:none;stroke-dasharray:none;overflow:visible;enable-background:accumulate;display:inline;fill:#d18946" /&gt;
  </code></pre>