I am looking for C or C++ code to identify whether the point (a co-ordinate) lies inside a KML polygon or not.
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:
- Identify whether given co-ordinate lies within polygon of KML (the code should exclude holes in the polygon too!).
- Informing the caller the distance to the nearest polygon edge if the point is outside the range.
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?
Would like to have inputs.