hello python hero and legends.there are things known and there are things unknown inbetween are doors
i have more then 23 routes generated by using network analyst. later on, i have converted the route into point shapefile. new formed point shapefile have many hundred of points for each routes. i have created a new column and i want to populate that column with sequential numbers for each point. a python script is available for such calculation but this scripts generates sequential number starting from 1st point to last one regardless the route class. i am looking for some advance calculation. i want sequential numbering for each route in new column. like
route type seq.no
1 point 1
1 point 2
1 point 3
1 point 4
2 point 1
2 point 2
2 point 3
.
.
.
.
so on.
i need all this is a single python script.
looking forward your great contribution.
Nadeem Fareed
hello python hero and legends.
i have more then 23 routes generated by using network analyst. later on, i have converted the route into point shapefile. new formed point shapefile have many hundred of points for each routes. i have created a new column and i want to populate that column with sequential numbers for each point. a python script is available for such calculation but this scripts generates sequential number starting from 1st point to last one regardless the route class. i am looking for some advance calculation. i want sequential numbering for each route in new column. like
route type seq.no
1 point 1
1 point 2
1 point 3
1 point 4
2 point 1
2 point 2
2 point 3
.
.
.
.
so on.
i need all this is a single python script.
looking forward your great contribution.
Nadeem Fareed
recDict = {} def autoIncrement(RID): global recDict pStart = 1 # adjust start value, if required pInterval = 1 # adjust interval value, if required if RID in recDict: recDict[RID] = recDict[RID] + pInterval else: recDict[RID] = pStart return recDict[RID]
dear sir
see the attachment for detail. its not working.
hello everyone
the script given in response to my post by rfairhur24
is not working well i tried it many ways i request rfairhur24, please try it and then send me back. i try hard to get job done with this script but its not working. i also request the other user or expert to please do me favor and just post something different and new for this task. i also request rfairhur24 please provide me stand alone python script that can work like a tool, any thing that could work batter. there is another option that i have
each route have single unique ID named CID.
for every route CID is different like for route no 1. points CID is 1, for route no.2 CID is 2 same is true for 23 routes.
i am looking for a scripts that generate the sequential ID for each CID.
best regards
Nadeem Fareed
recDict = {} def autoIncrement(CID): global recDict pStart = 1 # adjust start value, if required pInterval = 1 # adjust interval value, if required if not CID: CID = "Null" if CID in recDict: recDict[CID] = recDict[CID] + pInterval else: recDict[CID] = pStart return recDict[CID]