diff --git a/sphericalpolygon/excess_area.py b/sphericalpolygon/excess_area.py index c890ac3..6537b49 100644 --- a/sphericalpolygon/excess_area.py +++ b/sphericalpolygon/excess_area.py @@ -29,7 +29,7 @@ def polygon_excess(vertices): dlon = np.abs(pdlon) # If two adjacent vertices are close enough(coincident), do nothing. - if dlon < 1e-6: continue + if dlon < 1e-6 and np.abs(pdlat) < 1e-6: continue # Calculate the area of a spherical triangle consisting of sides and north poles if dlon > np.pi: dlon = 2*np.pi - dlon @@ -69,4 +69,4 @@ def polygon_area(vertices): if area > 2*np.pi: area = 4*np.pi - area - return area \ No newline at end of file + return area