next up previous contents index
Next: Distance calculation with boundaries Up: Using polylines with gstat Previous: Using point-in-polygon test   Contents   Index


Using polylines with interpolation

Edges are used for neighborhood selection after testing for radius/maximum number of data points. The global selection will be changed as well.

Suppose we have an estimation point (to get an interpolated/simulated value at) and a data point. First, all relevant edges in the search neighborhood are found. This works by comparing the bounding boxes of all edges with the box region of the estimation point (fig. B.6).

Figure B.6: Test of edges' extents
\includegraphics {eps/boxtest.eps}

Then, depending on the type of the polyline (open/closed), the line-of-sight test or the point-in-polygon test is performed for the estimation point and all data points found so far.

During the testing, if the estimation point is found being on any edge, this edge is skipped for further testing for this estimation point for all data points. If a data point lies on any edge, this edge will not be tested for this data point anymore.

The edges test is repeated for all edges found. A data point will be used, if it passes the test for all edges.

As you can see, all testing is done by brute-force testing. So if you have a lot of edges, with all of them relevant for most of the data points, this will slow down interpolation/simulation a lot. Smarter edges searching is for sure possible, for example, using line quadtrees. Better testing can probably be implemented in connection with finding the shortest path between two points.


next up previous contents index
Next: Distance calculation with boundaries Up: Using polylines with gstat Previous: Using point-in-polygon test   Contents   Index
Edzer Pebesma
1999-08-31