Skip to content

[STATSGRASS] Questions on calculating minimum dista ncebetween polygons and map attributes after m.in.e00

1 message · White.Denis@epamail.epa.gov

#
Yes, spheroid distance is one issue; computational complexity is
another.  I looked into this when I had a problem of computing pairwise
distances between 10,000 polygons for an application in conservation
biology.  The brute force computational complexity, searching for the
closest pair of points across all pairs of polygons, would be about
O(m^2 * n^2), if there were n polygons with an average of m points, say.

In Kristian's case these numbers are not so prohibitive as the number of
countries is not so many, and he can cut down on the search space for
closest points by eye to some degree.  Using the MySQL function
"distance" may or may not be an efficient algorithm for the single pair
case (haven't looked at it carefully), but it would have to be embedded
in some outer algorithm for the many pairs situation.

I think that the Okabe and Miller approach with Voronoi methods is the
general way to go, but I didn't have time to program it, and couldn't
find an available implementation, so I punted and used a series of
buffered distances (I also had an exponential inverse distance relation
and therefore could set a reasonable maximum buffer size).

Denis
but
http://www.mysql.com/doc/en/Functions_that_test_spatial_relationships_between_ge
distance
the
between
so
of
Bergen,