According to the ESRI Shapefile Documentation,
“The neighborhood to the right of an observer walking along the ring in
vertex order is the inside of the polygon”. Meaning that all normal or
“clean” polygons are drawn in a clockwise fashion. When it comes to
holes in the polygons, these are defined by a counterclockwise path
delineating the polygon.
“The neighborhood to the right of an observer walking along the ring in
vertex order is the inside of the polygon”. Meaning that all normal or
“clean” polygons are drawn in a clockwise fashion. When it comes to
holes in the polygons, these are defined by a counterclockwise path
delineating the polygon.
The first step to
determining if a polygon is an additive vector or a subtractive one is
to determine the direction in which the polygon is formed. ESRI
Shapefiles do not support polygons that cross their own lines, which
makes calculating data with them a bit easier. One method to determine
the direction the polygon is formed is by using Green’s Theorem.
This method would require one to take the current coordinate (x1,y1),
and the next one (x2,y2), and apply the following formula:
∑(x2x1)*(y2+y1). For each line segment, one would then need to add
the result to a running total, and if the number ends up being
positive, the polygon is clockwise, and if it is negative, the polygon
is counterclockwise.
determining if a polygon is an additive vector or a subtractive one is
to determine the direction in which the polygon is formed. ESRI
Shapefiles do not support polygons that cross their own lines, which
makes calculating data with them a bit easier. One method to determine
the direction the polygon is formed is by using Green’s Theorem.
This method would require one to take the current coordinate (x1,y1),
and the next one (x2,y2), and apply the following formula:
∑(x2x1)*(y2+y1). For each line segment, one would then need to add
the result to a running total, and if the number ends up being
positive, the polygon is clockwise, and if it is negative, the polygon
is counterclockwise.
The Formula:
Example:
KML code:
(Figure 2.1) 

Using the KML code above to create the triangle above:

KML code:
(Figure 2.2) 

Using the KML code above to create the triangle above:

There is also a really good flash based demo on how this works available online here: http://www.mechanisms101.com/greens_theorem_demo.html