Getting the distance between points and the closest edge of the nearest polygon
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
Solved! Go to Solution.
- Labels:
- Help
- Spatial Analysis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The Distance tool help documentation does a great job of explaining the different configuration options: https://help.alteryx.com/current/designer/distance-tool
- 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).
- 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).
- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
