## ShortestPathTo

**Syntax**

ShortestPathTo(MapWinGeoProc.Topology2D.Extents Ext)

**Summary**

In the 2D case, we can treat the edges of the extents as segments and use the segment distance equations to find the closest distance. This returns null if the shapes intersect.

**Parameters**

Ext |
The Extents to inspect and return the point that is closest to this polygons centroid. If there are equal distances, this will keep the first segment it finds. |

**Returns**

a Segment representing the path between the two closest points on each object.

Visual Basic Net 2005 Example
Implementation Code

Visual C# 2005 Example Implementation
Code

Back
to Polygon