PHP Classes

Find nearest polygon to a point?

Recommend this page to a friend!

      Polygon  >  All threads  >  Find nearest polygon to a point?  >  (Un) Subscribe thread alerts  
Subject:Find nearest polygon to a point?
Summary:How can I find the nearest polygon to a vertex?
Messages:2
Author:Robert Yalantra
Date:2013-03-10 17:29:50
Update:2014-04-09 21:33:10
 

  1. Find nearest polygon to a point?   Reply   Report abuse  
Picture of Robert Yalantra Robert Yalantra - 2013-03-10 17:29:50
Is there a way to find the polygon that is nearest a given vertex? Is there a way to calculate the shortest distance between a given vertex and some point inside a polygon? If I could do that, I could iterate through all my polygons and determine which one is the shortest distance away.

Thanks!

  2. Re: Find nearest polygon to a point?   Reply   Report abuse  
Picture of Mark Whittemore Mark Whittemore - 2014-04-09 21:33:10 - In reply to message 1 from Robert Yalantra
Think of it this way ...

It will either be a line segment mid-point ... or the closest of the polygons vertices.

Am I wrong ?