Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Getting the distance between points and the closest edge of the nearest polygon

WayneDavis
5 - Atom

I am trying to get the distance from points to the closest edge of the nearest polygon. Does the Nearest Tool calculate distances to the polygon centroid or to the boundary?

2 REPLIES 2
BrandonB
Alteryx
Alteryx

The Distance tool help documentation does a great job of explaining the different configuration options: https://help.alteryx.com/current/designer/distance-tool

 

  1. Point-to-point: The Distance tool calculates the distance between two sets of point type spatial objects. An example is calculating the distance from records in a customer file (point type) to records in a store file (point type).
  2. Point-to-edge (line): The Distance tool calculates the distance between a set of point type spatial objects and the closest edge of a set of line type spatial objects. An example is calculating the distance from the records in a customer file (point type) to the nearest interstate highway (edge of line spatial type).
  3. Point-to-edge (polygon ): The Distance tool calculates the distance between a set of point type spatial objects and the closest edge of a set of polygon type spatial objects.
    • When the points are contained within the polygons, you can choose one of two options: Return a distance of zero, or Return the distance to the nearest edge. If the point is located inside of a polygon the Distance tool returns a negative number for the distance to the edge of the containing polygon.
    • When the points are contained outside of the polygons, you can also choose to have the Distance tool calculate the Nearest Interior point within the nearest edge of a polygon.
    • While this method of calculating distance takes the curvature of the Earth into consideration, it is not a routing routine and does not follow street patterns or honor physical barriers such as bodies of water.
WayneDavis
5 - Atom

I did a comparison between Distance and Nearest Tools. The Nearest Tool calculates distances the same as point-to-line and point-to-polygon in the Distance Tool when you have the Polygon or Lines as your Nearest Tool Universe (note that the Distance Tool was configured to return a distance of 0 when the point is inside the polygon). This answers my own question - Nearest Tool does calculate the distance to the nearest edge of the closest polygon. 

Labels