In his answer to Accessing the logic values of a TikZ coordinate, Jake proposes a code to get the value of TikZ coordinate.
Today I've tried to use it to answer Make a polygon with automatically labelled nodes according to their coordinates
where I wanted to print coordinate values of some node anchors
\documentclass[tikz, margin=5pt]{standalone}
\makeatletter
\newcommand\xcoord[2][center]{{%
\pgfpointanchor{#2}{#1}%
\pgfmathparse{\pgf@x/\pgf@xx}%
\pgfmathprintnumber{\pgfmathresult}%
}}
\newcommand\ycoord[2][center]{{%
\pgfpointanchor{#2}{#1}%
\pgfmathparse{\pgf@y/\pgf@yy}%
\pgfmathprintnumber{\pgfmathresult}%
}}
\makeatother
\pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=2}
\begin{document}
\begin{tikzpicture}
\node[draw, minimum size=2cm] (A) {A};
\node[above right] at (A.north east) {(\xcoord{A.north east},\ycoord{A.north east})};
\end{tikzpicture}
\end{document}
but compilation stops with next error message
! Package pgf Error: No shape named A.north east is known.
See the pgf package documentation for explanation.
Type H <return> for immediate help.
...
l.22 ... at (A.north east) {(\xcoord{A.north east}
,\ycoord{A.north east})};
Then I tried with a real coordinate
\coordinate (aux) at (A.north east);
\node[above right] at (A.north east) {(\xcoord{aux},\ycoord{aux})};
and it worked. Could you explain me why?


(A.north east)has to be parsed char by char before finding which coordinate refers it to. This is done probably by tikz, and thus it cannot be done by\pgfpointanchor. – JLDiaz May 23 '14 at 09:24