It's a bit unclear what your goal is here. To clarify, you can try the following suggestions:
Encapsulate the shape in a symbol with a precise viewBox dimension. For example:
<symbol id="braga_porto" viewBox="2848 1665 3985 4275">
Utilize the symbol to ensure it aligns correctly in its original position:
<use href="#braga_porto" x="2848" y="1665" width="3985" height="4275"...
Please cross-reference the values of the x, y, width, and height attributes with the viewBox dimensions of the symbol.
- If you need to scale up the shape to fit the width of the SVG canvas, adjust the position (x,y) of the
<use>
element to 0,0 (top-left corner of the canvas). The use should then occupy the entire width (e.g. 12969). Calculate the appropriate height to maintain the aspect ratio (e.g. 4275 * 12969 / 3985).
Compare the new width of the use element with the viewBox value of the SVG container.
use.addEventListener("click",()=>{
use.setAttribute("x","0");
use.setAttribute("y","0");
use.setAttribute("width",12969);
use.setAttribute("height",4275 * 12969 / 3985);
});
svg{border:solid}
<svg viewBox="0 0 12969 26674">
<symbol id="braga_porto" viewBox="2848 1665 3985 4275">
<path id="Braga" data-z="32" class="Braga" d="M5329 1730c-66-17-64 0-92 15l-110 113c-121 4-292 156-324 162-42-3-181 2-190-1l-63-42-153 42c-101 28-190 153-246 162-51-1-120-63-171 40-4 70-22 172-11 235-20 5-54 13-72 31l-21 36...
</symbol>
<use href="#braga_porto" x="2848" y="1665" width="3985" height="4275" id="use" />
</svg>
To determine the precise viewBox values for the symbol, I utilized the getBBox() method.