Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Does anyone knows why method "partCount" in arcgis version 10.0 always gives me back value 1, even when I have object with interniorring or multipart object?

partnum = 0
partcount = feat.partCount
while partnum < partcount:
    outFile.write(str(inRow.GetValue(inDesc.OIDFieldName)) + " " + str(partnum) + "\n")
    gp.AddMessage(str(inRow.GetValue(inDesc.OIDFieldName)) + " \\ " + str(partnum))
    part = feat.getpart(partnum)
    part.reset()
    pnt = part.next()
    pnt_count = 0
    while pnt:
        outLine = str(pnt_count) + " " + str(pnt.x) + " " + str(pnt.y) + " " + str(pnt.z) + " " + str(pnt.m) + "\n"
        outFile.write(outLine.replace(".", sepchar))
        pnt = part.next()
        pnt_count += 1
        if not pnt: # ?
            pnt = part.next()
            if pnt:
                outFile.write("InteriorRing\n")
share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.