next up previous contents index
Next: Trouble shooting Up: Using polylines with gstat Previous: Using polylines with interpolation   Contents   Index


Distance calculation with boundaries

Both variogram calculation and interpolation depend on the calculation of distance between two points. Without edges, this distance is simply an Euclidean one. Taking edges into account, the situation will be more difficult (fig. B.7).

Figure B.7: Indirect path between two points
\includegraphics {eps/dist.eps}

Depending on the boundary topology, a shortest path could be not so obvious at all.

There is a well-known solution for the problem of finding the shortest path between points separated by some polygons (i.e. building the connection graph and using Dijkstra's algorithm). We were not able to find any ready solution for the case of open polylines. So until the solution is found, the distance between two points will be calculated without taking boundaries into account. We suppose that the correct solution will also eliminate the problems of the line-of-sight test.



Edzer Pebesma
1999-08-31