python - While-Loop does not work correctly -



python - While-Loop does not work correctly -

i little bit confused, i'm trying write script modify cell values in raster. next loop should list coordinates of raster (249x249 cells). unfortunately, variable i not change.

i = xminf j = yminf zaehler = 0 while(i < xmaxf): while(j < ymaxf): arcpy.addmessage("check in-while, klappe nr: " + str(zaehler)) zaehler += 1 arcpy.addmessage(str(i) + " " +str(j)) j += cellsizef += cellsizef

this output:

check in-while, klappe nr: 0 33322321.35 6011434.28 check in-while, klappe nr: 1 33322321.35 6011436.07602 check in-while, klappe nr: 2 33322321.35 6011437.87205 . . . check in-while, klappe nr: 248 33322321.35 6011879.69398 check in-while, klappe nr: 249 33322321.35 6011881.49

so 249 positions in fact 1 column of raster. know why code not work?

thanks help!

i = xminf zaehler = 0 while(i < xmaxf): j = yminf while(j < ymaxf): arcpy.addmessage("check in-while, klappe nr: " + str(zaehler)) zaehler += 1 arcpy.addmessage(str(i) + " " +str(j)) j += cellsizef += cellsizef

try this.

python while-loop arcgis arcpy

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -