Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

lines somewhat work

  • Loading branch information...
commit 40992e0892a9717c155b5caed2c93dac4a347701 1 parent 492fa16
@calvinmetcalf authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 esri2open/wkb.py
View
8 esri2open/wkb.py
@@ -3,13 +3,13 @@
def pts(c):
return ["dd",[c.X,c.Y]]
def linearRing(coordinates):
- partCount=coordinates.partCount
+ partCount=coordinates.count
i=0
values =[0]
outnum = "I"
out = ["I",[0]]
while i<partCount:
- pt = coordinates.getPart(i)
+ pt = coordinates[i]
if pt:
[ptrn,c]=pts(pt)
outnum+=ptrn
@@ -40,13 +40,13 @@ def makeMultiPoint(c):
return Binary(pack(*values))
def makeMultiLineString(c):
values = ["<BI",1,5]
- [ptrn,coords]=linearRing(c)
+ [ptrn,coords]=linearRing(c.getPart(0))
values[0]+=ptrn
values.extend(coords)
return Binary(pack(*values))
def makeMultiPolygon(c):
values = ["<BI",1,6]
- [ptrn,coords]=linearRing(c)
+ [ptrn,coords]=linearRing(c.getPart(0))
values[0]+=ptrn
values.extend(coords)
return Binary(pack(*values))
Please sign in to comment.
Something went wrong with that request. Please try again.