ispolycw
Determine if polygon vertices are in clockwise order
Syntax
Description
Examples
Input Arguments
Output Arguments
Tips
The
ispolycwfunction returns1(true) when a polygon contains two or fewer vertices.You can specify geographic coordinates as input to the
ispolycwfunction when the polygon does not cross the Antimeridian or contain a pole. A polygon contains a pole when the longitude data spans 360 degrees. To use geographic coordinates as input, specifyxusing the longitude vector andyusing the latitude vector.
Algorithms
When a polygon intersects itself, the order of the vertices is not well defined. In this
case, the ispolycw function determines the vertex order using the
vertices immediately before and after the leftmost vertex with the lowest y
value. If the function does not determine the order from the leftmost vertex with the lowest
y value, it determines the order by using a signed area test.
Version History
Introduced before R2006a