Following this answer: Drawing on an image with TikZ, I'm using
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.9\textwidth]{some_image.jpg}};
\begin{scope}[x={(image.south east)},y={(image.north west)}]
\end{scope}
\end{tikzpicture}
to draw over an image. This (inside the scope environment) reescales the coordinates of both the x and y axis to match the borders of the image (y = 0 is the lower border and y = 1 the upper border of the image). I want to use these new reescaled lengths in a command like
\node[inner sep = 0.5]
The 0.5 will default to 0.5pt, while I may want to use the lengths in which the x or the y axis are given. Is there any simple way in which I can obtain this length and then use it in a node command? I'm looking for something that would look as \node[inner xsep = \xlength, inner ysep = \ylength]

\pgfgetlastxy{\macrox}{\macroy}"Stores the most recent used (x,y) coordinates into two macros" – Nister Dec 06 '16 at 15:12