On 2013–09–23 Hans Hagen wrote:
a couple of times the question came up¹²³ how to create more intelligent referencing. There are already mechanisms in the core, namely \somewhere and \atpage but they both have drawbacks. \somewhere happily prints its text if the figure is placed on the same double page. In fact, no text at all should be printed if the figure is visible. Furthermore it's a little verbose to use unless hidden in a custom macro. \atpage on the other hand doesn't hesitate to print “see figure 1.2 at page 42” while you're on page 42.
Just wondering .. did you look at \atpage?
I did, indeed.
there is some info available about reference locations
\atpage basically just calls \strc_references_by_reference_page_state which only provides three states: current page, before of after the current page. This is not flexible enough, e.g. it does not take short distances into account (next/previous page), which is nice to have but not required. More important is that it's not aware of the concept of double pages. So the reader is presented with “as we show above” even if the graphic is visible on the double page. Marco