Don't try to infer things from a non-existant string.
Merge branch 'dont-crash-on-txt-files' of git://github.com/borgar/topojson
Restrict spherical ringArea to [-2π, 2π].

This ensures that we can correctly force a clockwise winding order for
all polygons that are smaller than a hemisphere, including those winding
around poles.

Fixes #123.
Merge branch 'ringArea'
More intelligent forcing of polygon winding order.

Previously, if a polygon was incorrectly specified with the order of
interior and exterior rings swapped, TopoJSON would attempt to maintain
the existing ordering of rings, and reverse their winding orders.

However, this doesn't resolve the issue, since it creates an exterior
ring which is smaller than the interior ring(s).  Since the interior
rings are counter-clockwise and aren’t contained within the exterior,
they end up subtracting from the whole sphere rather than from the
exterior ring.

A better solution is to use the largest ring as the exterior, and then
ensure that the winding orders are all as expected assuming the rings
are smaller than a hemisphere.
Fix typo.
Add clockwise tests.
Fix failing test.

The failing test contained two polygons, one with a CW and the other
with an equivalent but CCW ring, and each with a zero-area ring.  The
rings for both polygons are now automatically reordered so that the
zero-area rings are treated as holes.  The non-zero-area rings are
forced to be clockwise, since they are both exterior rings.  Finally,
the zero-area rings are removed by filter, resulting in both polygons
having the same clockwise ring.
Add clockwise tests for cartesian coordinates.
Merge branch 'clockwise'
Add AMD support. Fixes #129.
Abbreviate per @maxogden.
Fix filtering of small polygons with holes.

(Or, the unusual case of Bora Bora.) When filtering polygons, the old
implementation could filter the exterior ring of a polygon but keep its interior
rings, thus promoting the first interior ring to the exterior!
Fix filtering for holes.

We should use the inverted area to determine whether to filter holes, since
we’re trying to measure the area of the hole, not that area around the hole. But
note that it’s still faster to check the exterior ring first before checking any
interior rings.
More filter tests.
Merge branch 'fix-filter'
Fix #137.
Ignore endpoints with --simplify-proportion.

Fixes #138. With the old behavior, it was possible to pick a minimum area of
infinity if, say, 10% of the points are endpoints and the desired simplify
proportion is 0.1.
Add --filter; deprecate --allow-empty.

There are now three filtering modes. The "none" method does nothing, equivalent
to the old --allow-empty. The "small" method removes small rings, equivalent to
the old --no-allow-empty (the old default behavior). The "small-detached" method
removes small rings that are not attached to any other ring. This is the new
default behavior, as it is more conservative in removing polygons: it will
remove islands and detached holes, but it won’t remove small municipalities and
leave unexpected gaps in larger areas. Fixes #139.

A slightly better implementation would detect the total area of all connected
rings, allowing --filter to remove all of the rings if the combined area is
still less than the threshold. For now though, this is still an improvement.
Verify that zero-area rings are still removed.