Actually, this is a continuation of a previous post entitled "Count the number of corners of a polygon". Although I managed to count the number of points (i.e. saying corners) of each polygon the problem is that even a polygon may be approximately rectangular actually has more than four points because of the digitization process i.e. sometimes an approximate straight line consists of more than 2 points. How can I ignore the intermediate additional points that are not really needed for my purpose? Thanks.
Tell me more
×
Geographic Information Systems Stack Exchange is a question and answer site for
cartographers, geographers and GIS professionals. It's 100% free, no registration required.
|
I would simplify the polygon first to remove any of the unwanted vertices. |
|||||||||
|
|
Go through each vertex and for each that is outside of tolerance of 180 degrees include in the count? |
|||
|
|


bool ignore = Math.abs(angle - 180) > threshold– Chris Aug 25 '11 at 12:16