class readGeo: def __init__(feat, geom): feat.geom = geom def returnGeom(feat): fGeom = feat.geom partCount = fGeom.partCount rings = "[" featLst = [] vrtxNum = 0 while vrtxNum < partCount: part = fGeom.getPart(vrtxNum) pnt = part.next() while pnt: featLst.append("[" + str(int(round(pnt.X))) + ", " + str(int(round(pnt.Y))) + "]") pnt = part.next() if not pnt: for pair in featLst: rings += pair + ", " del featLst[:] rings = rings[0:len(rings)-2] + "]" pnt = part.next() if pnt: rings += ", [" elif partCount > 1: rings += ", [" vrtxNum += 1 if partCount == 1: return rings else: return rings[0:len(rings)-3]
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.