Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.