MySub(!shape!)
def MySub(feat): partnum = 0 # Count the number of points in the current multipart feature partcount = feat.partCount pntcount = 0 # Enter while loop for each part in the feature (if a singlepart feature # this will occur only once) # while partnum < partcount: part = feat.getPart(partnum) pnt = part.next() # Enter while loop for each vertex # while pnt: pntcount += 1 pnt = part.next() # If pnt is null, either the part is finished or there is an # interior ring # if not pnt: pnt = part.next() partnum += 1 pntcount = pntcount - 1 return pntcount
This worked perfectly! Thanks
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.