SciTools/cartopy — pull request #132 by esc24 (2012-11-05 15:20:30+00:00)
Title: Prevent attempts to create a LinearRing from a line.

When contouring some data I got the following error
```
ValueError: A LinearRing must have at least 3 coordinate tuples
```
I tracked it down to projecting the following linear ring from PlateCarree() to PlateCarree(180.0):
```
[(0.0, -45.0), (0.0, -44.99974961593933), (0.0007278698251379579, -45.0), (0.0, -45.000105851567454), (0.0, -45.0)]
```
which results in:
```
[(-179.99999999936145, -44.99974961617812), (-179.99927213023045, -45.00000000000001), (-179.99999999936145, -45.00010585146651)]
```
The first and last source points (on the boundary) have been lost leaving three projected points very close to the boundary. Given the proximity of the first and last remaining points to each other, the code assumes they are the same point and attempts to create a linear ring leading to the error. This pull request prevents an attempt to form a linear ring from a line string with less than four points where the first and last points are close (in a numpy sense).