I have a square grid over a 2D rectangular domain. Some of the grid nodes may be missing, in particular on the outline.
Some of the nodes of the grid are displaced in $x$ and $y$, with given "confidence weight" (see below). I would like to interpolate/extrapolate the positions of all the grid nodes, assuming that the deformation of the grid is smooth. The displacements are small compared to the cell size.
The confidence weight indicates are relative reliability of the displacement measurements, and the rationale is that if the displacement of a node has a low weight, while close neighbors have a higher one, the latter will prevail.
I am looking for a formulation of the problem that can lead to a system of equations and/or a resolution algorithm. It needs to take into account the weightings, as well as the possibility of missing nodes (though the computation of the displacements at missing nodes is not requested).
The picture below illustrates the desired effect (exaggerated). The circles show where the nodes are expected to be, and the diameters reflect the weights.



For the problem of deciding new node positions based on the given displacements and confidence levels, I think an interpolation approach is reasonable.
To find the displacement $\Delta=(\delta_x,\delta_y)$ at some point $(x,y)$, given a set of nodes at positions $(x_i,y_i)$ with displacements $\Delta_i=(\delta_{x,i},\delta_{y,i})$ with confidence $C_i$, you could do $$ \Delta(x,y) = \frac{\sum_i\Delta_iC_if\big(d((x,y),(x_i,y_i))\big)}{\sum_iC_if\big(d((x,y),(x_i,y_i))\big)} $$ where $d((x,y),(x_i,y_i))$ is the Euclidean distance between the two points, and $f$ is a function that decreases the influence of a point as the distance $d$ increase. Something like $f(z) = e^{-z^2}$, but you'll need to play around with the decay rate and maybe make it compactly-supported depending on the spatial scale of your problem.
If the deformation is sufficiently small, you should be able to recover the edges by looking for nodes which are close enough to each other, or re-using the adjacency matrix of the original grid.