-3

I'm trying to test if a point is insde a polygon. Polygon is stored in SHP file. Coordinate system WGS-84. Point coordinates are known (i.e. 55.638717,37.459322). For use with VBA I need a free ActiveX lib. I found MapWinGIS OCX. How to specify the coordinates of a point to test if a point is insde a polygon? Any ideas?

Anry
  • 1
  • 1

1 Answers1

1

A simple algorithm consists of travelling through your polygon and check if your point is always at the same side of the vertex, as you can see from this example (it only applies to convex polygons):

enter image description here

As you can see, the point A is located every time at the left of every vertex.
For the point E however: it is located at the left of v and w, but not of vertex u (where it's located at the right side).

Dominique
  • 16,450
  • 15
  • 56
  • 112