Subscribe to this thread
Home - General / All posts - Interpolation from points producing discs
tjhb

8,410 post(s)
#19-Nov-18 03:29

I have sent this in, but confirmation is welcome. (Or contradiction, even better.)

If we interpolate from a set of points, using Kriging or Gravity method, the resulting image seems to have flat discs around each source data point.

I have attached two screenshots. Source data is here on Dropbox.

I have used default interpolation settings, but have had no better results by varying them.

Attachments:
gravity.png
kriging.png

adamw


8,259 post(s)
#19-Nov-18 09:11

This looks like a product of using Voronoi neighbors. The circles indicate areas with specific Voronoi neighbors, when the set of neighbors changes (a coordinate leaves the set and / or a different coordinate enters), there appears a border. The borders are there in Manifold 8 as well, they are just more pronounced in 9 due to a different shading algorithm (which we are going to improve and extend, because shading in 8 sometimes does a better job).

If you want the result to be smoother (which you likely do), either switch from Voronoi neighbors to "no more than N" neighbors with the radius either specified manually or computed automatically. (Thinking about it, maybe Voronoi neighbors are not a good default and we should use something like neighbors = 50, radius = 0 = autocompute.)

tjhb

8,410 post(s)
#19-Nov-18 12:05

I thought so at first too, but I get a similar result specifying (say) 12 neighbours (with radius 0=automatic). I'll try with 50.

tjhb

8,410 post(s)
#19-Nov-18 12:44

[P.s. it would be very nice if the transform template picked up a source field named 'Z' if it exists, rather than defaulting to mfd_id. It does pick up 'elevation' which is good.]

tjhb

8,410 post(s)
#19-Nov-18 12:38

Much better with 64 neighbours, thanks.

(Less quick, but that is to be expected. Still very very fast, using all CPU cores without waiting to be asked.)

The problem is perhaps with this data, which has significant anisotropy, being made from contours.

I will also try specifying a radius.

Attachments:
gravity 64.png
kriging 64.png

tjhb

8,410 post(s)
#19-Nov-18 13:02

Here's Kriging with radius 1024, neighbours 32, Gaussian model.

Don't know what to make of this!

The discrete breaks look like an error to me, as if an integer type is being used somewhere (wrongly).

(The breaks are visible in all examples to varying degrees. The shading does a good job of detecting them.)

Attachments:
kriging 1024, 32, Gaussian.png

tjhb

8,410 post(s)
#19-Nov-18 23:36

I'm still testing and will post more shortly.

One distraction: the drawing I used for testing is comprised of multipoints. (An oversight, sorry.) Decomposing to single points produces a slightly different result--the visible edge effects are slightly softer--and the processing is (I think) slightly faster.

I am starting to wonder whether the edge effects may be a side-effect of the massive parallelisation that makes these interpolation methods so fast. (Each overlapping "patch" produced by an independent thread, perhaps.) If so, they may be unavoidable. Which would not be serious, since the edge artefacts are easily suppressed with a light filter on the resulting image. For example, a Blur with radius 3 and power 1, or Gaussian Blur radius 4 power 1, both work well.

I'll post back with a direct comparison between Manifold 9 and Manifold 8, using matching settings (as far as possible), when the Manifold 8 test has finished processing.

tjhb

8,410 post(s)
#20-Nov-18 00:24

By the way, the timing comparison is pretty incredible.

I thinned the points in the original drawing by a factor of 3 to make a more realistic test for Manifold 8.

In Manifold 8 I used settings Kriging, (up to) 10 neighbours, Voronoi neighbours only, Exponential model, 5x5m output pixels. That's been running now for 1 hour 8 minutes, and shows "Interpolating pixels 23%" in the dialog, with progress in the status bar showing 44%.

In Manifold 9, with the same data and the same settings: consistently 1.6 seconds ...plus slightly under 0.06s for the Blur.

It's really hard to get tired of this software.

adamw


8,259 post(s)
#20-Nov-18 08:53

Decomposing multi-points into single points might have an effect on the result if there are lots of points at roughly equal distances (which means that sets of neighbors for pixels are not terribly stable) - this tends to happen with grids of points that are intentionally spaced equally.

We'll look into this more just in case.

tjhb

8,410 post(s)
#21-Nov-18 01:57

Here is a direct comparison between Kriging results in Manifold 8 and Manifold 9.

The Manifold 8 result shows different artefacts compared with the Manifold 9 result. They are less obviously explicable (short multi-pixel spikes, occuring away from source points), and would be significantly harder to smooth away. There are still visible "seams", at the boundaries of what I imagine are the boundaries of processing "patches" (irregularly-spaced tiles). The patch arrangement is different from Manifold 9 (of course). I don't know Kriging well enough to know if seams of this kind are natural/inevitable.

The Manifold 8 procedure took somewhere between 4 hours (last exact note, at 75% interpolation) and 5 hours 20 minutes (estimate). Total time was not automatically logged.

As a reminder, the corresponding Manifold 9 process takes 1.6 seconds.

Both interpolations use the same thinned source data (attached in kapiti2.7z), and the same interpolation settings as described above.

Attachments:
Kapiti 2 kriging exponential 10n m8 detail.png
Kapiti 2 kriging exponential 10n m8 full.png
Kapiti 2 kriging exponential 10n m9 detail.png
Kapiti 2 kriging exponential 10n m9 full.png
kapiti2.7z

Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.