jack_stepeny Posted August 15, 2011 Report Share Posted August 15, 2011 I have to generate unique Id sequentially for each parcel in a grid in ArcGIS. In each grid numbering will start from upper left corner to right corner then again numbering will start from left just like we type next line in microsoft word. Any help will be appreciated. Quote Link to comment Share on other sites More sharing options...
yousef2233 Posted August 16, 2011 Report Share Posted August 16, 2011 if I understand you correctly, I think you should change your coordinate systems somehow, put your origin in the top left, and make a new field YX (Y & X) of the centroid. Normal coordinate systems are like the numbers below Y ^ 3 2 1 1 2 3 > X calculate X , Y for each centroid and then replace Y with ( Y - Max (Y)) 0 -1 -2 1 2 3 use ABS function to make Y values positive 0 1 2 1 2 3 then in a new field calculate ( new Y & X) 1 2 3 0 01 02 03 1 11 12 13 2 21 22 23 then sort this new field and make sequentially numbering with python codes in the arcgis 10. Quote Link to comment Share on other sites More sharing options...
Lurker Posted August 16, 2011 Report Share Posted August 16, 2011 nice explanation yousef2233 +1 to you Quote Link to comment Share on other sites More sharing options...
yousef2233 Posted August 16, 2011 Report Share Posted August 16, 2011 thank you so much lurker :smiley: Quote Link to comment Share on other sites More sharing options...
jack_stepeny Posted August 16, 2011 Author Report Share Posted August 16, 2011 @yousef2233 Exactly what you explained. bcoz of coordinates in arcgis parcels number which I m generating are in sequence but they starts from left bottom corner and goes to right. I just want to do it from upper left corner. right now i m using script in field calculator. Got this script from ESRI forum. Static rec As Long Dim pStart As Long Dim pInterval As Long pStart = 1 pInterval = 1 If (rec = 0) Then rec = pStart Else rec = rec + pInterval End If if you have any script please share. Quote Link to comment Share on other sites More sharing options...
yousef2233 Posted August 16, 2011 Report Share Posted August 16, 2011 if you prepared sth to sort first like i said (in ascending) then this is the script that sequentially numbers the features and that's exactly what you need. btw, you could find it in field calculator help i think. best regards, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.