Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sphericalpolygon/excess_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -69,4 +69,4 @@ def polygon_area(vertices):

if area > 2*np.pi: area = 4*np.pi - area

return area
return area