Home -
General /
All posts - SQL - Using Distance between Points and Areas
|
What does the SQL Distance function measure between Point and Area objects? Is it the distance from nearest edge/node of an Area to a point or the centroid of an Area to a point?
Chat with Manifold users on IRC Server: irc.freenode.net, Channel: #planetmanifold, IRC FAQ |
|
The distance from the point to the nearest location* along the boundary of the area (or zero, if the point is inside the area). *Not necessarily a coordinate.
|
|
I was working on a query to find Areas within 500ft of a Point and was undecided if I should use Distance or use Touches with a 500ft Buffer of the Point - now I know either will give the same result. Thanks Tim.
Chat with Manifold users on IRC Server: irc.freenode.net, Channel: #planetmanifold, IRC FAQ |
|
Brian, Buffer() often won't give the same result, because it draws a "circle" having 32 sides. (The same goes for EnclosingCircle(), where that applies.) Distance() doesn't have this limitation so it's better to standardise on that where possible.
|
|
Good to know, thanks again.
Chat with Manifold users on IRC Server: irc.freenode.net, Channel: #planetmanifold, IRC FAQ |