Permalink
Browse files

fix line issue

  • Loading branch information...
1 parent 36c7a83 commit 3da6aca5ef101d3e1b0d5c30d8170c8b2369a658 Calvin Metcalf committed Oct 29, 2013
Showing with 9 additions and 13 deletions.
  1. +5 −9 Install/esri2open/topojson/clockwise.py
  2. +4 −4 Install/esri2open/topojson/line.py
@@ -16,16 +16,12 @@ def clock_geometry(self,geo):
return geo
def clockwise_polygon(self,rings):
i=0
- n=0
r = rings[i]
if len(rings):
n=len(rings)
- if self.area(r)<0:
- r=list(reversed(r))
- i+=1
- while i<n:
- r=rings[i]
- if self.area(rings[i]) > 0:
- r=list(reversed(r))
- i+=1
+ while i<n:
+ r=rings[i]
+ if self.area(rings[i]) > 0:
+ r=list(reversed(r))
+ i+=1
return rings
@@ -23,7 +23,7 @@ def line(self,points,opened):
self.line_arcs = [];
n = len(points)
current_arc = Strut()
- k = 1
+ k = 0
p=False
t=False
if not opened:
@@ -52,11 +52,11 @@ def line(self,points,opened):
point0 = point
k = i
i+=1
- i = 0
+ i = -1
if opened:
- m = n
+ m = n-1
else:
- m = n+1
+ m = n
while i < m:
i+=1
point = points[(i + k) % n]

0 comments on commit 3da6aca

Please sign in to comment.