I'm creating a three-dimensional model of the earth based on SRTM height data. The data set is pretty huge, so only a small fraction of the data is available at any given time.
The height data is organized in 1° x 1° tiles which come in different resolutions (from 1x1 to 1200x1200, roughly in power-of-two steps). For visualization purposes, I'm sampling the surface in equidistant steps. The sampling theorem gives me an optimal tile resolution to work on, and as long as the point is in the middle of a tile or all neighbouring tiles have the same resolution, this is pretty straightforward.
I'm currently employing cubic splines to get a continuously differentiable surface function. Data points are grey, the sampled point is the red x, used data points are green.
The problem appears when a point is near the border of two differently-resolved tiles.
Using the point's nearest neighbours and linearly interpolating between them gives me a continuous surface, but not a differentiable one:
The most common of such neighbourships is unfortuanely a large (1200x1200 or 600x600) tile being next to a 1x1 one.
I need an algorithm for interpolating smoothly on these borders that offers
- near-exact results if the queried point coincides with a tile data point
- continuous differentiability in both directions
- high-frequency features fading out quickly into low-resolution tiles
- good performance (possibly at the expense of accuracy)