title: Point in KML Polygon - C / C++ code
body: <p>I am looking for C or C++ code to identify whether the point (a co-ordinate) lies inside a KML polygon or not.</p>
  
  <p>I have searched but all I got is javascript (google maps apis) which can achieve the same. I cannot even port it directly because I have a slight modified requirement:</p>
  
  <ol>
  <li>Identify whether given co-ordinate lies within polygon of KML (the code should exclude holes in the polygon too!).</li>
  <li>Informing the caller the distance to the nearest polygon edge if the point is outside the range.</li>
  </ol>
  
  <p>As far as I have researched, the 2nd point has not been achieved anywhere yet. I would want to know how to achieve this in C or C++? Or, have I missed searching any existing sources?</p>
  
  <p>Would like to have inputs.</p>